Skip to content

Commit dc74c1d

Browse files
committed
update
1 parent 3549a6a commit dc74c1d

File tree

2 files changed

+46
-3
lines changed

2 files changed

+46
-3
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Copyright 2018-2018 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package org.hellojavaer.ddal.ddr.sqlparse.exception;
17+
18+
/**
19+
*
20+
* @author <a href="mailto:hellojavaer@gmail.com">Kaiming Zou</a>,created on 2018/5/28.
21+
*/
22+
public class SQLParserCompatibilityException extends DDRSQLParseException {
23+
24+
public SQLParserCompatibilityException() {
25+
}
26+
27+
public SQLParserCompatibilityException(String message) {
28+
super(message);
29+
}
30+
31+
public SQLParserCompatibilityException(String message, Throwable cause) {
32+
super(message, cause);
33+
}
34+
35+
public SQLParserCompatibilityException(Throwable cause) {
36+
super(cause);
37+
}
38+
39+
public SQLParserCompatibilityException(String message, Throwable cause, boolean enableSuppression,
40+
boolean writableStackTrace) {
41+
super(message, cause, enableSuppression, writableStackTrace);
42+
}
43+
}

ddal-jsqlparser/src/main/java/org/hellojavaer/ddal/jsqlparser/JSQLParserAdapter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* #%L
33
* ddal-jsqlparser
44
* %%
5-
* Copyright (C) 2016 - 2017 the original author or authors.
5+
* Copyright (C) 2016 - 2018 the original author or authors.
66
* %%
77
* This program is free software: you can redistribute it and/or modify
88
* it under the terms of the GNU Lesser General Public License as
@@ -92,8 +92,8 @@ public class JSQLParserAdapter extends JSQLBaseVisitor {
9292
try {
9393
checkJSqlParserFeature();
9494
checkCompatibilityWithJSqlParser();
95-
} catch (Exception e) {
96-
throw new RuntimeException("JSqlParser feature check failed", e);
95+
} catch (Throwable e) {
96+
throw new SQLParserCompatibilityException("JSqlParser feature check failed", e);
9797
}
9898
}
9999

0 commit comments

Comments
 (0)