提交 3fd46db7 编写于 作者: S Serge Rider

#1043 Extra error handling in LOB operations

上级 9de030fa
......@@ -102,7 +102,7 @@ public class ContentPanelEditor extends BaseValueEditor<Control> {
public void run(DBRProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
try {
streamEditor.primeEditorValue(monitor, control, content);
} catch (DBException e) {
} catch (Throwable e) {
log.debug(e);
valueController.showMessage(e.getMessage(), DBPMessageType.ERROR);
}
......@@ -121,7 +121,7 @@ public class ContentPanelEditor extends BaseValueEditor<Control> {
} else {
try {
streamEditor.extractEditorValue(VoidProgressMonitor.INSTANCE, control, content);
} catch (Exception e) {
} catch (Throwable e) {
log.debug(e);
valueController.showMessage(e.getMessage(), DBPMessageType.ERROR);
}
......
......@@ -61,7 +61,7 @@ public class JDBCContentBLOB extends JDBCContentLOB {
if (blob != null) {
try {
return blob.length();
} catch (SQLException e) {
} catch (Throwable e) {
throw new DBCException(e, dataSource);
}
}
......@@ -90,11 +90,10 @@ public class JDBCContentBLOB extends JDBCContentLOB {
contentLength,
platform.getPreferenceStore().getString(ModelPreferences.CONTENT_HEX_ENCODING));
}
}
catch (SQLException e) {
throw new DBCException(e, dataSource);
} catch (IOException e) {
throw new DBCException("IO error while reading content", e);
} catch (Throwable e) {
throw new DBCException(e, dataSource);
}
} else {
// Create new local storage
......@@ -112,7 +111,7 @@ public class JDBCContentBLOB extends JDBCContentLOB {
} catch (IOException e) {
ContentUtils.deleteTempFile(tempFile);
throw new DBCException("IO error while copying stream", e);
} catch (SQLException e) {
} catch (Throwable e) {
ContentUtils.deleteTempFile(tempFile);
throw new DBCException(e, dataSource);
}
......
......@@ -67,7 +67,7 @@ public class JDBCContentCLOB extends JDBCContentLOB implements DBDContent {
}
try {
return clob.length();
} catch (SQLException e) {
} catch (Throwable e) {
throw new DBCException(e, dataSource);
}
}
......@@ -92,7 +92,7 @@ public class JDBCContentCLOB extends JDBCContentLOB implements DBDContent {
}
catch (IOException e) {
throw new DBCException("IO error while reading content", e);
} catch (SQLException e) {
} catch (Throwable e) {
throw new DBCException(e, dataSource);
}
} else {
......@@ -109,7 +109,7 @@ public class JDBCContentCLOB extends JDBCContentLOB implements DBDContent {
} catch (IOException e) {
ContentUtils.deleteTempFile(tempFile);
throw new DBCException("IO error while copying content", e);
} catch (SQLException e) {
} catch (Throwable e) {
ContentUtils.deleteTempFile(tempFile);
throw new DBCException(e, dataSource);
}
......@@ -197,8 +197,8 @@ public class JDBCContentCLOB extends JDBCContentLOB implements DBDContent {
catch (SQLException e) {
throw new DBCException(e, dataSource);
}
catch (Exception e) {
throw new DBCException("IO error while reading content", e);
catch (Throwable e) {
throw new DBCException("IO error while binding content", e);
}
}
......
......@@ -540,7 +540,7 @@ public final class SQLUtils {
}
}
}
catch (Exception e) {
catch (Throwable e) {
log.warn(e);
return SQLConstants.NULL_VALUE;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册