diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-09-28 12:05:32 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-09-28 12:05:32 +0100 |
| commit | 2f8e32636912e23552f5b43a2c84109b77fe7a92 (patch) | |
| tree | 3fd8b56052a8dba9ab501f164fd83b2da545c7ab /src/main/java/org/shedlang/compiler/cli | |
| parent | b1ca0653b7bd80302a287faef3a7c7647f92d23a (diff) | |
Attach source to all compiler errors
Diffstat (limited to 'src/main/java/org/shedlang/compiler/cli')
| -rw-r--r-- | src/main/java/org/shedlang/compiler/cli/ShedCli.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/shedlang/compiler/cli/ShedCli.java b/src/main/java/org/shedlang/compiler/cli/ShedCli.java index 29f27161..bdbbfb39 100644 --- a/src/main/java/org/shedlang/compiler/cli/ShedCli.java +++ b/src/main/java/org/shedlang/compiler/cli/ShedCli.java @@ -7,7 +7,7 @@ import org.shedlang.compiler.ShedCompiler; import org.shedlang.compiler.backends.Backends; import org.shedlang.compiler.backends.GenerateInstructionsBackend; import org.shedlang.compiler.backends.PatioBackend; -import org.shedlang.compiler.errors.SourceError; +import org.shedlang.compiler.errors.CompilerError; import java.io.IOException; import java.nio.file.Paths; @@ -17,8 +17,8 @@ public class ShedCli { var args = parseArgs(rawArgs); try { compile(args); - } catch (SourceError error) { - System.err.println(error.getSource().describe()); + } catch (CompilerError error) { + System.err.println(error.source().describe()); System.err.println(error.getMessage()); System.exit(2); } |
