Skip to content

Batch mode debugger: print backtrace, quit with 1.#752

Open
c-kloukinas wants to merge 1 commit into
armedbear:masterfrom
c-kloukinas:debugger-fails-when-no-repl
Open

Batch mode debugger: print backtrace, quit with 1.#752
c-kloukinas wants to merge 1 commit into
armedbear:masterfrom
c-kloukinas:debugger-fails-when-no-repl

Conversation

@c-kloukinas
Copy link
Copy Markdown

An attempt to resolve issue 750.

Now, when running in batch mode, an error causes a backtrace to be printed and abcl to exit with error code 1.

@c-kloukinas
Copy link
Copy Markdown
Author

Before:

/usr/local/src$ java -server -Xrs -cp /usr/local/src/abcl/dist/abcl.jar org.armedbear.lisp.Main \
                       --noinform --batch --load not-there.lisp < /dev/null ; echo $?
#<THREAD "interpreter" native {58665DA1}>: Debugger invoked on condition of type FILE-ERROR
  File not found: /usr/local/src/not-there.lisp
[1] CL-USER(1): 0
/usr/local/src$

After:

/usr/local/src$ java -server -Xrs -cp /usr/local/src/abcl-chris/dist/abcl.jar org.armedbear.lisp.Main \
                       --noinform --batch --load not-there.lisp ; echo $?
#<THREAD "interpreter" native {2412ABF5}>: Debugger invoked on condition of type FILE-ERROR
  File not found: /usr/local/src/not-there.lisp

*** ERROR WHILE RUNNING IN BATCH MODE! ***
(#<LISP-STACK-FRAME (BACKTRACE) {6BDB4E03}> #<LISP-STACK-FRAME (INVOKE-DEBUGGER File not found: /usr/local/src/not-there.lisp) {43BEAC5D}> #<JAVA-STACK-FRAME org.armedbear.lisp.Lisp.error(Lisp.java:385) {89319F4}> #<JAVA-STACK-FRAME org.armedbear.lisp.Load.load(Load.java:165) {40284EA6}> #<JAVA-STACK-FRAME org.armedbear.lisp.Load.load(Load.java:124) {7132ABF6}> #<JAVA-STACK-FRAME org.armedbear.lisp.Interpreter.postprocessCommandLineArguments(Interpreter.java:333) {47D83DC9}> #<JAVA-STACK-FRAME org.armedbear.lisp.Interpreter.createDefaultInstance(Interpreter.java:110) {5794D07F}> #<JAVA-STACK-FRAME org.armedbear.lisp.Main$1.run(Main.java:46) {554BF955}> #<JAVA-STACK-FRAME java.base/java.lang.Thread.run(Thread.java:1583) {31C29511}>)
1
/usr/local/src$

(also note that we no longer need to do abcl ... < /dev/null )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Batch processing returns with success (0), even when there is an error.

1 participant