Bill Allombert on Sat, 11 Feb 2012 18:41:32 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

new GP function dbg_err


Dear PARI developers,

As discussed at the Ateliers, I have added a new GP function to use
in the breakloop: dbg_err returns the current error data.

Also I have implement Vec(t_ERROR) to make dbg_err() easier to use.
An example:
? Mod(4,8)^-1
  ***   at top-level: Mod(4,8)^-1
  ***                         ^---
  *** _^_: impossible inverse modulo: Mod(4, 8).
  ***   Break loop: type 'break' to go back to GP
break> dbg_err()
error("impossible inverse modulo: Mod(4, 8).")
break> Vec(dbg_err())
["e_INTMOD", Mod(4, 8)]
? sin(cos)
  ***   at top-level: sin(cos)
  ***                 ^--------
  *** sin: incorrect type in a transcendental function (t_CLOSURE).
  ***   Break loop: type 'break' to go back to GP
break> dbg_err()
error("incorrect type in a transcendental function (t_CLOSURE).")
break> Vec(dbg_err())
["e_TYPE", "a transcendental function", cos]

Cheers,
Bill.