New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UDF division by 0 [CORE742] #1117
Comments
Commented by: Alice F. Bird (firebirds) Date: 2006-01-03 08:49 I'm inclined to make it a feature request (convert |
Modified by: @pcisarissuetype: New Feature [ 2 ] => Improvement [ 4 ] assignee: Dmitry Yemanov [ dimitr ] SF_ID: 1388205 => |
Modified by: @pcisarassignee: Dmitry Yemanov [ dimitr ] => |
Modified by: @pcisarWorkflow: jira [ 10766 ] => Firebird [ 15170 ] |
Commented by: @livius2 I know that this is not the place for discussion - but this is very old report but please fix this and other udf related errors as above 1/0 |
Commented by: @dyemanov Karol, libraries should never throw exceptions to the caller process, this is what software developers should learn from the very beginning. If you need to report an error, return some code in a status variable / result value. Perhaps we could handle some async exceptions (CPU/FPU ones), but definitely not user-defined exceptions. |
Commented by: @livius2 Dmitry, consider another example consider update set field=udf |
Commented by: @asfernandes Karol, do you understand that each language, compiler and OS may implements exceptions in its own unique way? |
Commented by: @livius2 Yes, but this exception can be catched by code which call dll function i do not say that if someone raise exception XXX, YYY, ZZZ then engine should reraise it as GDS_XXX, GDS_YYY, GDS_ZZZ |
Commented by: @dyemanov The "code which call DLL function" is named Firebird and written in C++ w/ MSVC, this means that its catch block is unlikely to see exceptions passed from UDF written in a different environment. We can handle hardware exceptions (oveflows, division by zero, etc) and rethrow them as GDS errors, but I still think we shouldn't be over-smart trying to handle software exceptions. UDFs that ignore conventions for dynamic libraries by throwing user-defined exceptions deserve a crash, same as with any other piece of software. |
Commented by: @livius2 this is not "over-smart" If UDF raise exception because user action unforeseen by the programmer at design/implementation time Handling hardware exceptions is also good as increase clarify what kind of problem occur - but if this was software exception then FB should raport single "GDS_UDF" error without any other info |
Commented by: @livius2 I think about that and consider body of udf try e.g if you wrote udf and parameter is regular expression |
Submitted by: Michael Trowe (bubble76)
Votes: 1
SFID: 1388205#
Submitted By: bubble76
If in an UDF raises an Exception due to a devision by 0
the Service stops.
WinXP
Firebird2 Beta1 / Superserver as Service
The text was updated successfully, but these errors were encountered: