<Preferred convention for exiting script?> #!/usr/...
# forum
r
Preferred convention for exiting script? #!/usr/bin/env kotlin val usage = "..." if(args.isEmpty()){ print(usage); exitProcess(1) } // or check(args.isNotEmpty()){ usage } Which would be more correct, or in what context? I’m assuming the first is a system errno, which is not ideal when not knowing the host target. The other is an IllegalStateException, which might convince the user that there’s an internal problem in the script. 1 post - 1 participant <a...