diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/org/traccar/helper/NamedParameterStatement.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/org/traccar/helper/NamedParameterStatement.java b/src/org/traccar/helper/NamedParameterStatement.java index 500fbe4b3..f507a4cf8 100644 --- a/src/org/traccar/helper/NamedParameterStatement.java +++ b/src/org/traccar/helper/NamedParameterStatement.java @@ -128,10 +128,13 @@ public class NamedParameterStatement { } else if (statement.getWarnings() != null) { reset(true); } - } catch (SQLException error) { - Log.info("Exception during query preparation"); - Log.warning(error.getMessage()); - reset(true); + } catch (SQLException firstError) { + try { + reset(true); + } catch (SQLException secondError) { + Log.info("Exception during query preparation"); + throw secondError; + } } } |