RosettaCodeData/Task/Exceptions/PARI-GP/exceptions-4.parigp
2023-07-01 13:44:08 -04:00

3 lines
221 B
Text

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