Bug 124393 - [patch] getdata: verbose error descriptions
Summary: [patch] getdata: verbose error descriptions
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: George Staikos
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-28 01:52 UTC by D. V. Wiebe
Modified: 2006-03-28 02:53 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Getdata verbose error patch (31.68 KB, patch)
2006-03-28 01:53 UTC, D. V. Wiebe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description D. V. Wiebe 2006-03-28 01:52:26 UTC
Version:           1.3.0_devel (using KDE KDE 3.5.1)
Installed from:    Compiled From Sources
Compiler:          gcc (GCC) 3.4.6 
OS:                Linux

The accompanying patch adds a public function, 

char* GetDataErrorString(char* buffer, size_t buflen)

which provides an expanded error description over and above what GD_ERROR_CODES[] gives us for the last encountered getdata error.  It provides line numbers and file names for format file syntax errors, field names for lookup errors, and various useful ancilliary data for other error types.

It also adds an internal function, SetGetDataError, which is now used to set all error return codes.

Current users of getdata (including kst) should be unaffected by this patch: the behaviour of all other public getdata functions is unchanged.
Comment 1 D. V. Wiebe 2006-03-28 01:53:10 UTC
Created attachment 15328 [details]
Getdata verbose error patch
Comment 2 George Staikos 2006-03-28 02:13:32 UTC
Thanks Don.
Comment 3 George Staikos 2006-03-28 02:53:37 UTC
SVN commit 523386 by staikos:

Commit Don's patch with an ISO C compliance fix
FEATURE: 124393


 M  +296 -107  getdata.c   [POSSIBLY UNSAFE: scanf]
 M  +16 -1     getdata.h