Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
5
Task/Exceptions/PARI-GP/exceptions-1.parigp
Normal file
5
Task/Exceptions/PARI-GP/exceptions-1.parigp
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
trap(/* specific error can be given here, or leave blank to catch all */,
|
||||
"caught"
|
||||
,
|
||||
error("bad stuff")
|
||||
)
|
||||
1
Task/Exceptions/PARI-GP/exceptions-2.parigp
Normal file
1
Task/Exceptions/PARI-GP/exceptions-2.parigp
Normal file
|
|
@ -0,0 +1 @@
|
|||
error("Text of error here")
|
||||
1
Task/Exceptions/PARI-GP/exceptions-3.parigp
Normal file
1
Task/Exceptions/PARI-GP/exceptions-3.parigp
Normal file
|
|
@ -0,0 +1 @@
|
|||
pari_err(arither1, "functionName"); // Gives "*** functionName: not an integer argument in an arithmetic function"
|
||||
3
Task/Exceptions/PARI-GP/exceptions-4.parigp
Normal file
3
Task/Exceptions/PARI-GP/exceptions-4.parigp
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue