diff --git a/source/tlang/commandline/commands.d b/source/tlang/commandline/commands.d index b6435635..65221637 100644 --- a/source/tlang/commandline/commands.d +++ b/source/tlang/commandline/commands.d @@ -198,18 +198,17 @@ struct compileCommand } catch(TError t) { - gprintln(t.msg, DebugType.ERROR); + ERROR(t.msg); exit(-1); } catch(ErrnoException e) { - /* TODO: Use gogga error */ - writeln("Could not open source file "~sourceFile); + ERROR("Could not open source file "~sourceFile); exit(-2); } catch(Exception e) { - gprintln(e.msg, DebugType.ERROR); + ERROR(e.msg); exit(-1); } } @@ -252,13 +251,12 @@ struct lexCommand } catch(TError t) { - gprintln(t.msg, DebugType.ERROR); + ERROR(t.msg); exit(-1); } catch(ErrnoException e) { - /* TODO: Use gogga error */ - writeln("Could not open source file "~sourceFile); + ERROR("Could not open source file "~sourceFile); exit(-2); } } @@ -303,13 +301,12 @@ struct parseCommand } catch(TError t) { - gprintln(t.msg, DebugType.ERROR); + ERROR(t.msg); exit(-1); } catch(ErrnoException e) { - /* TODO: Use gogga error */ - writeln("Could not open source file "~sourceFile); + ERROR("Could not open source file "~sourceFile); exit(-2); } } @@ -360,13 +357,12 @@ struct typecheckCommand } catch(TError t) { - gprintln(t.msg, DebugType.ERROR); + ERROR(t.msg); exit(-1); } catch(ErrnoException e) { - /* TODO: Use gogga error */ - writeln("Could not open source file "~sourceFile); + ERROR("Could not open source file "~sourceFile); exit(-2); } }