01: /*
02: * JobErrorHandler.java
03: *
04: * This file is part of SQL Workbench/J, http://www.sql-workbench.net
05: *
06: * Copyright 2002-2008, Thomas Kellerer
07: * No part of this code maybe reused without the permission of the author
08: *
09: * To contact the author please send an email to: support@sql-workbench.net
10: *
11: */
12: package workbench.interfaces;
13:
14: /**
15: *
16: * @author support@sql-workbench.net
17: */
18: public interface JobErrorHandler {
19: final int JOB_CONTINUE = 1;
20: final int JOB_IGNORE_ALL = 2;
21: final int JOB_ABORT = 3;
22:
23: /**
24: * Callback function if an error occurs.
25: * @param errorRow the row in which the error occurred
26: * @param errorColumn the column in which the error occurred (null if there was a problem in reading the row)
27: * @param data the data which was processed (if errorColumn != null the column value, else the row value)
28: * @param errorMessage the errorMessage from the Job
29: *
30: * @return JOB_CONTINUE the job should ignore the error (if possible and continue) or JOB_ABORT
31: */
32: int getActionOnError(int errorRow, String errorColumn, String data,
33: String errorMessage);
34:
35: /**
36: * A fatal error has occured and should be displayed to the user. The backend worker
37: * will stop its process after calling this.
38: */
39: void fatalError(String msg);
40: }
|