Re: [Firebird-devel] Arg::SqlState
29.01.2020 08:57, Alex Peshkoff via Firebird-devel wrote: You should be able to do something like (Arg::Warning(isc_...) << Arg::SqlState("01000")).raise(); and after fixing related bugs see that sql state when warning is displayed. It won't work in plugin because .raise() is throwing status_exception but CLOOP is catching FbException. -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Arg::SqlState
On 2020-01-29 13:35, Dimitry Sibiryakov wrote: 29.01.2020 08:57, Alex Peshkoff via Firebird-devel wrote: You should be able to do something like (Arg::Warning(isc_...) << Arg::SqlState("01000")).raise(); and after fixing related bugs see that sql state when warning is displayed. It won't work in plugin because .raise() is throwing status_exception but CLOOP is catching FbException. Like any other use of Arg::StatusVector.raise(). Add try/catch if you want to use internal classes in plugin. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Arg::SqlState
29.01.2020 11:41, Alex Peshkoff via Firebird-devel wrote: Add try/catch if you want to use internal classes in plugin. Actually I don't want to use them. Just to look at them as an example. -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Arg::SqlState
On 2020-01-29 10:57, Alex Peshkoff via Firebird-devel wrote: On 2020-01-28 20:01, Dimitry Sibiryakov wrote: 28.01.2020 17:55, Alex Peshkoff via Firebird-devel wrote: More or less obvious - if sql state to be set explicitly when raising an exception and should differ from default for used error code. Yes, it is obvious but I wonder how to use it with warnings. That will be first such use of this class. You should be able to do something like (Arg::Warning(isc_...) << Arg::SqlState("01000")).raise(); and after fixing related bugs see that sql state when warning is displayed. I've certainly provided a bad example. Warnings are not thrown, they can be just stored in status manually. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Arg::SqlState
29.01.2020 11:43, Dimitry Sibiryakov wrote: Just to look at them as an example. Perhaps I had to go straight to object: is there an example of IStatus::setWarnings2() usage? -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Arg::SqlState
On 2020-01-29 14:25, Dimitry Sibiryakov wrote: 29.01.2020 11:43, Dimitry Sibiryakov wrote: Just to look at them as an example. Perhaps I had to go straight to object: is there an example of IStatus::setWarnings2() usage? StatusArg.cpp, 292 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Arg::SqlState
29.01.2020 13:35, Alex Peshkoff via Firebird-devel wrote: Perhaps I had to go straight to object: is there an example of IStatus::setWarnings2() usage? StatusArg.cpp, 292 It doesn't show how to form input status array (sequence of tags). Should it start from isc_arg_gds(FB_SUCCESS) or straight from isc_arg_warning? What is parameter for isc_arg_warning? Interbase API Guide v6 has no mention of warnings at all. -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Arg::SqlState
On 2020-01-29 17:21, Dimitry Sibiryakov wrote: 29.01.2020 13:35, Alex Peshkoff via Firebird-devel wrote: Perhaps I had to go straight to object: is there an example of IStatus::setWarnings2() usage? StatusArg.cpp, 292 It doesn't show how to form input status array (sequence of tags). Should it start from isc_arg_gds(FB_SUCCESS) or straight from isc_arg_warning? straight What is parameter for isc_arg_warning? Interbase API Guide v6 has no mention of warnings at all. Some errors in msgs are used as warnings. Looks like any error code can be used as warning code - but here I'm not 100% sure. See for detrails use of Arg::Warning - it's used in 100500 places in src. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] MSVC Backend Updates in Visual Studio 2019 Versions 16.3 and 16.4
https://devblogs.microsoft.com/cppblog/msvc-backend-updates-in-visual-studio-2019-versions-16-3-and-16-4/ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] [FB-Tracker] Created: (CORE-6239) Compiler can make more rigorous check for presense of RETURNS(...) clause in SP header when SP body contains SUSPEND.
Compiler can make more rigorous check for presense of RETURNS(...) clause in SP header when SP body contains SUSPEND. - Key: CORE-6239 URL: http://tracker.firebirdsql.org/browse/CORE-6239 Project: Firebird Core Issue Type: Improvement Components: Engine Reporter: Pavel Zotov Priority: Minor This SP will be compiled without errors or warnings: set term ^ ; create or alter procedure sp_missed_returns_in_its_header as begin -- we use SUSPEND clause but there is no -- output parameters in this SP header: suspend; end ^ set term ;^ commit; But attempt to select from this SP will, of course, fail: === Statement failed, SQLSTATE = 42000 Dynamic SQL Error -SQL error code = -84 -procedure SP_MISSED_RETURNS_IN_ITS_HEADER does not return any values === -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel