diff --git a/hsarweb/src/de/hsadmin/web/AbstractModule.java b/hsarweb/src/de/hsadmin/web/AbstractModule.java
index 846fe83..9e69384 100644
--- a/hsarweb/src/de/hsadmin/web/AbstractModule.java
+++ b/hsarweb/src/de/hsadmin/web/AbstractModule.java
@@ -87,7 +87,7 @@ public abstract class AbstractModule implements Module, Serializable {
((InsertAble) thisModule).insertRow(map);
componentFactory.loadData();
} catch (HsarwebException e) {
- application.showUserException(e);
+ application.showHsarWebException(e);
}
}
});
diff --git a/hsarweb/src/de/hsadmin/web/HomeModule.java b/hsarweb/src/de/hsadmin/web/HomeModule.java
index a109e4d..e8004b6 100644
--- a/hsarweb/src/de/hsadmin/web/HomeModule.java
+++ b/hsarweb/src/de/hsadmin/web/HomeModule.java
@@ -146,7 +146,7 @@ public class HomeModule extends AbstractModule implements ComponentFactory, Upda
}
((UpdateAble) thisModule).updateRow(map);
} catch (HsarwebException e) {
- application.showUserException(e);
+ application.showHsarWebException(e);
}
}
});
diff --git a/hsarweb/src/de/hsadmin/web/MainApplication.java b/hsarweb/src/de/hsadmin/web/MainApplication.java
index fc81e35..40b4864 100644
--- a/hsarweb/src/de/hsadmin/web/MainApplication.java
+++ b/hsarweb/src/de/hsadmin/web/MainApplication.java
@@ -198,8 +198,16 @@ public class MainApplication extends Application implements HttpServletRequestLi
}
}
+ public void showHsarWebException(Exception e) {
+ if (e instanceof HsarwebUserException) {
+ showUserException(e);
+ } else {
+ showSystemException(e);
+ }
+ }
+
public void showUserException(Exception e) {
- getMainWindow().showNotification("Anwendungs-Fehler", "
" + e.getMessage(), Notification.TYPE_ERROR_MESSAGE);
+ getMainWindow().showNotification("Anwendungs-Fehler", "
" + e.getMessage(), Notification.TYPE_ERROR_MESSAGE);
}
public void showSystemException(Exception e) {
diff --git a/hsarweb/src/de/hsadmin/web/vaadin/TableComponentFactory.java b/hsarweb/src/de/hsadmin/web/vaadin/TableComponentFactory.java
index 566dc6a..363e32f 100644
--- a/hsarweb/src/de/hsadmin/web/vaadin/TableComponentFactory.java
+++ b/hsarweb/src/de/hsadmin/web/vaadin/TableComponentFactory.java
@@ -235,7 +235,7 @@ public class TableComponentFactory implements ComponentFactory, Serializable {
((UpdateAble) module).updateRow(map);
loadData();
} catch (HsarwebException e) {
- application.showUserException(e);
+ application.showHsarWebException(e);
}
}
});
@@ -294,7 +294,7 @@ public class TableComponentFactory implements ComponentFactory, Serializable {
((DeleteAble) module).deleteRow(map);
loadData();
} catch (HsarwebException e) {
- application.showUserException(e);
+ application.showHsarWebException(e);
}
}
});