RosettaCodeData/Task/Exceptions/PARI-GP/exceptions-4.pari

4 lines
221 B
Text
Raw Permalink Normal View History

2013-04-10 22:43:41 -07:00
GEN x = closure_trapgen(arither1, f); // Executes the function f, catching "not an integer argument in an arithmetic function" errors
if (x == (GEN)1L) // Was there an error?
pari_printf("Don't do that!\n"); // Recover