You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by nt...@apache.org on 2019/09/23 13:13:53 UTC
[cayenne] branch STABLE-4.1 updated: Log error
This is an automated email from the ASF dual-hosted git repository.
ntimofeev pushed a commit to branch STABLE-4.1
in repository https://gitbox.apache.org/repos/asf/cayenne.git
The following commit(s) were added to refs/heads/STABLE-4.1 by this push:
new 0be73ea Log error
0be73ea is described below
commit 0be73ea28672f92a3c2532b6d4373a4b6c85a4ba
Author: Nikita Timofeev <st...@gmail.com>
AuthorDate: Mon Sep 23 16:13:44 2019 +0300
Log error
---
.../apache/cayenne/modeler/action/LoadDbSchemaAction.java | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/LoadDbSchemaAction.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/LoadDbSchemaAction.java
index 0d715d2..5ca3b1f 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/LoadDbSchemaAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/LoadDbSchemaAction.java
@@ -34,6 +34,8 @@ import org.apache.cayenne.modeler.editor.dbimport.DraggableTreePanel;
import org.apache.cayenne.modeler.pref.DBConnectionInfo;
import org.apache.cayenne.modeler.pref.DataMapDefaults;
import org.apache.cayenne.modeler.util.CayenneAction;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import static org.apache.cayenne.modeler.pref.DBConnectionInfo.DB_ADAPTER_PROPERTY;
import static org.apache.cayenne.modeler.pref.DBConnectionInfo.JDBC_DRIVER_PROPERTY;
@@ -46,6 +48,8 @@ import static org.apache.cayenne.modeler.pref.DBConnectionInfo.USER_NAME_PROPERT
*/
public class LoadDbSchemaAction extends CayenneAction {
+ private static final Logger LOGGER = LoggerFactory.getLogger(LoadDbSchemaAction.class);
+
private static final String ICON_NAME = "icon-dbi-refresh.png";
private static final String ACTION_NAME = "Refresh Db Schema";
private DraggableTreePanel draggableTreePanel;
@@ -102,14 +106,13 @@ public class LoadDbSchemaAction extends CayenneAction {
.bindReverseEngineeringToDatamap(getProjectController().getCurrentDataMap(), databaseReverseEngineering);
((DbImportModel) draggableTreePanel.getSourceTree().getModel()).reload();
}
-
-
- } catch (Exception exception) {
+ } catch (Exception ex) {
JOptionPane.showMessageDialog(
Application.getFrame(),
- exception.getMessage(),
- "Error db schema loading",
+ ex.getMessage(),
+ "Error loading db schema",
JOptionPane.ERROR_MESSAGE);
+ LOGGER.warn("Error loading db schema", ex);
} finally {
rootParent.getLoadDbSchemaButton().setEnabled(true);
rootParent.getLoadDbSchemaProgress().setVisible(false);