Skip to content

Commit

Permalink
better logging and better error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Nov 5, 2011
1 parent a84809a commit f444a71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Expand Up @@ -25,7 +25,7 @@
import java.util.ResourceBundle;

/**
*
* Helper class that wraps resource bundles.
*/
public class Message {

Expand Down
Expand Up @@ -66,8 +66,10 @@ public class SqlScript {
private boolean failOnError = true;

private Map<String, String> replacementTokens;

private final static String MEMORY = "SQL snippet";

private String fileName = "memory";
private String fileName = MEMORY;

private String lineDeliminator;

Expand Down Expand Up @@ -224,7 +226,7 @@ public Long doInConnection(Connection connection) throws SQLException,
}
} catch (Exception e) {
log.info("ScriptError", lineCount, fileName);
throw new RuntimeException(Message.get("ScriptError", lineCount), e);
throw new RuntimeException(Message.get("ScriptError", lineCount, fileName), e);
} finally {
closeQuietly(rs);
closeQuietly(st);
Expand Down

0 comments on commit f444a71

Please sign in to comment.