/src/org/ubi/SyntaxError.java
http://github.com/nddrylliog/ooc · Java · 43 lines · 17 code · 7 blank · 19 comment · 0 complexity · 1ee521c7f23c0d3ec2d2e1e35b5a8cb8 MD5 · raw file
- package org.ubi;
- /**
- * A syntax error is at a specific location
- *
- * @author Amos Wenger
- */
- public class SyntaxError extends Exception {
- /**
- *
- */
- protected static final long serialVersionUID = 4274111704528892881L;
-
- protected FileLocation location;
- protected String simpleMessage;
- /**
- * Create a new syntax error at specified location with specified message
- * @param location
- * @param message
- */
- public SyntaxError(FileLocation location, String message) {
- super(message+location);
- this.location = location;
- this.simpleMessage = message;
- }
- /**
- * @return where the error occured in the source
- */
- public FileLocation getLocation() {
- return location;
- }
- /**
- * @return the error message, without the stack trace
- */
- public String getSimpleMessage() {
- return simpleMessage;
- }
- }