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

4 lines
221 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04: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