On 3/28/24 03:55, Waldek Hebisch wrote:
On Thu, Mar 28, 2024 at 03:15:46AM +0100, Ralf Hemmecke wrote:
That is easy, we have things like

error "makeSketch: constant polynomial"

That is, include function name as part of error message.

We should, maybe, more often use the two argument error function.

https://github.com/fricas/fricas/blob/master/src/algebra/error.spad#L47


Hmm, have you used them?

Oh, true, I haven't.

Documentation say "callable from the system interpreter".  'error' is
built into Spad compiler...

Wow! I learnt something new. As I understand it, there are two

  error: String -> Exit

functions, one builtin and one from ErrorFunctions. I wonder why you say that calling

  error("blah")$ErrorFunctions

in SPAD code might not work. The only strange calls I see are

  throwPatternMsg(s, []$(List String))$Lisp

and

  "exit" pretend Exit

but are they really problematic?

OK the answer to the above is not soo important to me, but I think Greg is right that the builtin 'error' should automatically show the function name in which it is called. Doesn't the compiler have all this information?

Such an improvement would really be great.

Ralf

--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/9af94552-a290-4e14-b9d4-b72b4950dd8e%40hemmecke.org.

Reply via email to