You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/site/sphinx/usage.rst
+37Lines changed: 37 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -145,6 +145,43 @@ For guidance with the API, use `JSQLFormatter <http://jsqlformatter.manticore-pr
145
145
</pre>
146
146
</div>
147
147
148
+
Error Handling
149
+
==============================
150
+
151
+
There are two features for handling errors
152
+
153
+
- ``parser.withErrorRecovery(true)`` will continue to the next statement separator and return an empty statement.
154
+
- ``parser.withUnsupportedStatements(true)`` will return an instance of the `UnsupportedStatement` class, although the first statement **must** be a regular statement
155
+
156
+
.. code-block:: java
157
+
:caption:ErrorRecovery
158
+
159
+
CCJSqlParser parser =newCCJSqlParser(
160
+
"select * from mytable; select from; select * from mytable2" );
0 commit comments