[ic] Try doesn't catch database errors within usertags

Mike Heins mike at perusion.com
Mon Feb 7 14:07:30 UTC 2011


Quoting Stefan Hornburg (Racke) (racke at linuxia.de):
> Hello,
> 
> I have the following code where [notes-create] is using 
> $Db{notes}->set_slice to
> create a database entry:
> 
> [try]
> [notes-create ...]
> [/try]
> 
> [catch error-set="notes_table" error-scratch="notes_table"]
> There was an error adding the note to the notes table. It was: $ERROR$
> [/catch]
> 
> set_slice dies but Interchange doesn't trigger the [catch].
> 
> Any idea why this is happening?

Remember set_slice does error catching of its own, so its eval {} will
probably prevent the die from getting to $Tag->try...

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.328.4479  <mike at perusion.com>

Experience is what allows you to recognize a mistake the second time you
make it. -- unknown



More information about the interchange-users mailing list