summaryrefslogtreecommitdiff
path: root/src/main/java/bjc/rgens/parser/RGrammarParser.java
diff options
context:
space:
mode:
authorBenjamin J. Culkin <bjculkin@mix.wvu.edu>2018-08-10 10:58:22 -0300
committerBenjamin J. Culkin <bjculkin@mix.wvu.edu>2018-08-10 10:58:22 -0300
commit2acee8f9acf53fd8c1f97f8d40bf0bd6fd53148a (patch)
tree8030a0d292218d1205b9f905945917641dc7eb73 /src/main/java/bjc/rgens/parser/RGrammarParser.java
parent22ab7a4dd6e608b5ef4d30b1d2ba2816a382dd52 (diff)
Update logging
Logging now uses the RGrammarLogging system so as to allow for better customizability of how the logging works
Diffstat (limited to 'src/main/java/bjc/rgens/parser/RGrammarParser.java')
-rwxr-xr-xsrc/main/java/bjc/rgens/parser/RGrammarParser.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/main/java/bjc/rgens/parser/RGrammarParser.java b/src/main/java/bjc/rgens/parser/RGrammarParser.java
index a1fc0e9..dae46fc 100755
--- a/src/main/java/bjc/rgens/parser/RGrammarParser.java
+++ b/src/main/java/bjc/rgens/parser/RGrammarParser.java
@@ -151,6 +151,7 @@ public class RGrammarParser {
String name = body.substring(0, nameIndex).trim();
String patt = body.substring(nameIndex + 1).trim();
+ throw new GrammarException("Regexize-rule pragma not yet supported");
//build.regexizeRule(name, patt);
});
@@ -215,10 +216,10 @@ public class RGrammarParser {
return build.toRGrammar();
} catch (GrammarException gex) {
String msg = String.format("Error in block (%s)", reader.getBlock());
- throw new GrammarException(msg, gex);
+ throw new GrammarException(msg, gex, gex.getRootMessage());
}
} catch (Exception ex) {
- throw new GrammarException("Unknown error handling block", ex);
+ throw new GrammarException("Unknown error handling block", ex, ex.getMessage());
}
}
@@ -301,10 +302,10 @@ public class RGrammarParser {
Block pragma = pragmaReader.getBlock();
String msg = String.format("Error in pragma: (%s)", pragma);
- throw new GrammarException(msg, gex);
+ throw new GrammarException(msg, gex, gex.getRootMessage());
}
} catch (Exception ex) {
- throw new GrammarException("Unknown error handling pragma block", ex);
+ throw new GrammarException("Unknown error handling pragma block", ex, ex.getMessage());
}
}
@@ -365,10 +366,10 @@ public class RGrammarParser {
} catch (GrammarException gex) {
String msg = String.format("Error in rule case (%s)", ruleReader.getBlock());
- throw new GrammarException(msg, gex);
+ throw new GrammarException(msg, gex, gex.getRootMessage());
}
} catch (Exception ex) {
- throw new GrammarException("Unknown error handling rule block", ex);
+ throw new GrammarException("Unknown error handling rule block", ex, ex.getMessage());
}
}
@@ -453,10 +454,10 @@ public class RGrammarParser {
}
} catch (GrammarException gex) {
throw new GrammarException(String.format("Error in where block (%s)",
- whereReader.getBlock()), gex);
+ whereReader.getBlock()), gex, gex.getRootMessage());
}
} catch (Exception ex) {
- throw new GrammarException("Unknown error in where block", ex);
+ throw new GrammarException("Unknown error in where block", ex, ex.getMessage());
}
}