MySQL Forums
Forum List  »  UDF

Re: How to return errors from UDF ?
Posted by: Frederic Descamps
Date: July 18, 2018 10:02AM

Hi Mathieu,

No really sure I understand your question, but usually I use a buffer where I will put the content of what I want my UDF will return.. instead of putting some decent value there, I check the arguments and if they are not the expected ones, I put my error msg in that buffer.

So if I do:
mysql> select lefred_udf('blabla');
| lefred_udf('blabla') |
| ERROR: 'blabla' not int |

something similar.

Btw, are you using the new component infrastructure to write your UDFs ?


Options: ReplyQuote

Written By
Re: How to return errors from UDF ?
July 18, 2018 10:02AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.