diff options
author | Shevek <[email protected]> | 2015-04-15 11:30:38 -0700 |
---|---|---|
committer | Shevek <[email protected]> | 2015-04-15 11:30:38 -0700 |
commit | ae212aa9cf0c7ed3bf76d85e4f62b328d4378176 (patch) | |
tree | 4af1646e3d88f1e1654a871c4829ab79e084979e /src/main/java/org/anarres/cpp/CppReader.java | |
parent | 010b69c2b39d11aa1c5dbc6302ea87e9ee4e9813 (diff) |
Backport source API to Java 1.5 for compatibility.
Diffstat (limited to 'src/main/java/org/anarres/cpp/CppReader.java')
-rw-r--r-- | src/main/java/org/anarres/cpp/CppReader.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/anarres/cpp/CppReader.java b/src/main/java/org/anarres/cpp/CppReader.java index 5517f47..4da49a5 100644 --- a/src/main/java/org/anarres/cpp/CppReader.java +++ b/src/main/java/org/anarres/cpp/CppReader.java @@ -111,7 +111,10 @@ public class CppReader extends Reader implements Closeable { } return true; } catch (LexerException e) { - throw new IOException(String.valueOf(e), e); + // new IOException(String, Throwable) is since 1.6 + IOException _e = new IOException(String.valueOf(e)); + _e.initCause(e); + throw _e; } } |