Displaing of HsarwebInternalException error messages.

This commit is contained in:
Purodha 2013-03-07 12:59:24 +00:00
parent 883f7185ea
commit a9543dddc6
4 changed files with 13 additions and 5 deletions

View File

@ -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);
}
}
});

View File

@ -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);
}
}
});

View File

@ -198,6 +198,14 @@ 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", "<br />" + e.getMessage(), Notification.TYPE_ERROR_MESSAGE);
}

View File

@ -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);
}
}
});