MySQL Forums
Forum List  »  PostgreSQL

How to raise/throw and error/exception?
Posted by: Dann Daggett
Date: July 11, 2008 06:25PM

I am converting from PostgreSQL to MySQL 5.0.

In Postgres, I used RAISE EXCEPTION 'my error text'; to throw an error when invalid data was being inserted into a table column (via a trigger). Pretty simple really. I thought ALL modern programming languages would have some support for error handling. Yet, here we are at version 5 of Mysql, and I find no way to throw an error in stored procedured or triggers. (I didn't find anything in the version 6 manual either) Can this be possible? I would have thought proper error handling would have been in version 1! WTF?

Any suggestions?


Options: ReplyQuote

Written By
How to raise/throw and error/exception?
July 11, 2008 06:25PM

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.