View Issue Details

IDProjectCategoryView StatusLast Update
0004034Multi Theft Auto : San AndreasScriptingpublic2009-10-30 03:58
Reporter50pAssigned ToFlobu 
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Product Version 
Target Version1.0.3Fixed in Version1.0.3 
Summary0004034: executeSQLQuery could return an error message from SQLite engine
Description

I wonder if you could add a new returned value by executeSQLQuery function. When execution fails executeSQLQuery returns false and shows an error message in a debug window and in the server console, eg:
"ERROR: Database query failed: near "FROM": syntax error"

I wanted executeSQLQuery() to return false, followed by that error message, so I could use that message in a GUI-based database browser.

Thanks in advance.

TagsNo tags attached.

Activities

eAi

2009-02-28 04:25

administrator   ~~0008426

Implement a Windows-style GetLastError function that returns a string detailing the last error to occur. Possibly provide arguments to specify what level of detail you want (e.g. just the error message, including the function name, including line number, including filename, or similar). Maybe also allow a stack of the past X errors so you can go back through them...

50p

2009-02-28 04:31

reporter   ~~0008427

That's a good idea. I'm not sure about the stack, it's another thing that server must handle. The server has already lots of things to remember wouldn't that slow down the server?

eAi

2009-02-28 13:15

administrator   ~~0008430

Storing a list of strings is hardly a strenuous thing to manage. It'd only be maybe 10 or so, not every error that's ever happened...

Flobu

2009-10-28 23:36

updater   ~~0010758

all sql functions that throws an error returned that error as second argument

http://github.com/Flobu1/multitheftauto/commit/094969532ce36106d8f0c0e6c38f6392d5da7269

ccw

2009-10-30 03:58

administrator   ~~0010762

Flobu's patch applied in http://github.com/multitheftauto/multitheftauto/commit/8df83013dd413f1fc4fb084b9ffdc68971530344

Issue History

Date Modified Username Field Change