[fpc-pascal] Catching Exceptions in Library
Could anybody tell me why the following error is caught by the try except in an Application, but not in a Library ? I am needing to find out where try except doesn't do what I think, not fix this code. this is a contrived error to show the problem, not part of my code :) procedure Test(); var Ctrl:TObject; begin try Ctrl := TObject(12345); sStr1 := Ctrl.ClassName; except writeln('Caught Exception'); end; end; Thanks - SteveG ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Catching Exceptions in Library
On 11/6/2014 7:39 PM, Steve Gatenby wrote: Could anybody tell me why the following error is caught by the try except in an Application, but not in a Library ? I am needing to find out where try except doesn't do what I think, not fix this code. are you seeing a different error than what you are expecting? if so, it is possible that it is triggered elsewhere in your code and not caught there... -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Catching Exceptions in Library
On 07/11/14 12:04, waldo kitty wrote: On 11/6/2014 7:39 PM, Steve Gatenby wrote: Could anybody tell me why the following error is caught by the try except in an Application, but not in a Library ? I am needing to find out where try except doesn't do what I think, not fix this code. are you seeing a different error than what you are expecting? if so, it is possible that it is triggered elsewhere in your code and not caught there... As far as I can tell, it falls thru (or back to) the application and is caught there. The problem is if you have a function 'chain' - F1 (app) calls F2 (lib) calls F3 (lib) etc If not caught in the failing function, its impossible to tell at which step it failed ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Catching Exceptions in Library
On 07.11.2014 01:39, Steve Gatenby wrote: Could anybody tell me why the following error is caught by the try except in an Application, but not in a Library ? I am needing to find out where try except doesn't do what I think, not fix this code. this is a contrived error to show the problem, not part of my code :) Which platform and OS and which compiler version? If you use 2.6.x and Win64 or Win32 then please test with 2.7.1 (for 32-Bit: please pass OPT="-dTEST_WIN32_SEH" to make). Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] Use of TSQLite.Query method (sqlite3db unit)
Hi to everybody, I am developing a small application that retrieves data from a SQLite3 file. Currently I am using the TSQLite class found in the unit sqlite3db. The Query method fills one of its arguments ("Table") with the result of the query. Each string in the "Table" variable is a comma-separated string containing the values of each column. I find this a bit inconvenient, as I have to parse the string in order to get back the values of the columns. (The C/C++ SQLite3 library allows to retrieve the value of each column separatedly, using the sqlite3_column_*** functions.) I was not able to find the documentation for TSQLite in the Free Pascal manuals. Am I missing something, or is it this the way the class is intended to be used? Cheers, Maurizio. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal