Mercurial Hosting > luan
changeset 1789:bac27b119ff2
exit code 1 on exception
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 24 Dec 2023 16:52:35 -0700 |
parents | 0a06d59578aa |
children | a8c685a894b4 |
files | src/luan/cmd_line.luan |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/luan/cmd_line.luan Fri Dec 22 09:48:52 2023 -0700 +++ b/src/luan/cmd_line.luan Sun Dec 24 16:52:35 2023 -0700 @@ -7,6 +7,8 @@ local unpack = Table.unpack or error() local Io = require "luan:Io.luan" local print = Io.print or error() +require "java" +local System = require "java:java.lang.System" local args = {...} @@ -24,5 +26,6 @@ catch e -- require "java"; e.java.printStackTrace(); Io.print_to(Io.stderr, e ) + System.exit(1) end end