On 06/03/2014 04:08 AM, Waldek Hebisch wrote:
> It was pointed to me that 'error' in .input files behaves
> differently than our normal error handler.  Namely, it
> behaves like ')set break resume', but this behaviour is
> fixed and can not be changed via ')set break ...'.
> The effect is that after call to 'error' current script
> is still executed -- usually not wat is wanted.
> 
> I think that we should change 'error' to use main error
> handler and respect ')set break ...'.

Fully agreed.

The more we remove differences or special handling in certain cases the
less someone has to learn.

Obviously, there is more than just that behaviour of error, but maybe it
goes away when you fix it...
... namely my current development happens with ")r file.input" which
first starts ")compile ..." and then does some code execution. Of
course, I want the script to stop if the compilation fails, but
seemingly for syntax errors, it continues.

Ralf

(2) -> )r foo.input
)compile foo.spad

   Compiling FriCAS source code from file
      /home/hemmecke/backup/git/fricas/src/doc/foo.spad using old
      system compiler.
   CONDOC abbreviates package ConstructorDocumentation
******** Spad syntax error detected ********
Expected: |)|
The prior line was:

    6>         print(abbrev::OutputForm

The current line is:

    7>         print(sourceCodeURL)


The number of valid tokens is 1.
The prior token was #S(TOKEN
                       :SYMBOL |)|
                       :TYPE KEYWORD
                       :NONBLANK NIL
                       :LINE_NUM 7
                       :CHAR_NUM 27)
The current token is #S(TOKEN
                        :SYMBOL NIL
                        :TYPE *EOF
                        :NONBLANK NIL
                        :LINE_NUM NIL
                        :CHAR_NUM 0)
1+2


   (2)  3

-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
)compile foo.spad
1+2
)abbrev package CONDOC ConstructorDocumentation
ConstructorDocumentation: with
    documentAll: (String, String) -> Void
  == add
    documentAll(abbrevs: String, sourceCodeURL: String): Void ==
        print(abbrev::OutputForm
        print(sourceCodeURL)

Reply via email to