[svn:parrot] r41432 - trunk/examples/nci
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Wed Sep 23 15:05:12 UTC 2009
Author: NotFound
Date: Wed Sep 23 15:05:11 2009
New Revision: 41432
URL: https://trac.parrot.org/parrot/changeset/41432
Log:
throw when prepare statement fails
Modified:
trunk/examples/nci/Mysql.pir
Modified: trunk/examples/nci/Mysql.pir
==============================================================================
--- trunk/examples/nci/Mysql.pir Wed Sep 23 12:35:59 2009 (r41431)
+++ trunk/examples/nci/Mysql.pir Wed Sep 23 15:05:11 2009 (r41432)
@@ -374,8 +374,13 @@
stmtobj = new ['Mysql';'Statement'], args
.return(stmtobj)
failed:
- null stmtobj
- .return(stmtobj)
+ .local string errmsg
+ errmsg = self.'error'()
+ errmsg = concat 'MySql error: ', errmsg
+ .local pmc ex
+ ex = new ['Exception']
+ ex['message'] = errmsg
+ throw ex
.end
########################################################################
More information about the parrot-commits
mailing list