diff --git a/src/fsh.nim b/src/fsh.nim index 7d9cbbd..cf3297c 100644 --- a/src/fsh.nim +++ b/src/fsh.nim @@ -164,7 +164,6 @@ proc evalVariable(vari: string): string = else: var e = newException(ShellVariableError, "No such variable: " & vari) e.variable = vari - e.msg = "No such variable: " & e.variable raise e # substitute does a substitution on the stream passed in @@ -220,7 +219,9 @@ proc runBuiltin(builtin: string, args: openArray[string]): string = case builtin: of "set": if args.len < 2: - raise newException(Exception, "Set: not enough arguments provided") + var e = newException(ShellCommandError, "Set: not enough arguments provided") + e.command="set" + raise e shellVariables[args[0]] = args[1..^1].join(" ") return "" of "setenv":