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); ((InsertAble) thisModule).insertRow(map);
componentFactory.loadData(); componentFactory.loadData();
} catch (HsarwebException e) { } 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); ((UpdateAble) thisModule).updateRow(map);
} catch (HsarwebException e) { } catch (HsarwebException e) {
application.showUserException(e); application.showHsarWebException(e);
} }
} }
}); });

View File

@ -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) { public void showUserException(Exception e) {
getMainWindow().showNotification("Anwendungs-Fehler", "<br/ >" + e.getMessage(), Notification.TYPE_ERROR_MESSAGE); getMainWindow().showNotification("Anwendungs-Fehler", "<br />" + e.getMessage(), Notification.TYPE_ERROR_MESSAGE);
} }
public void showSystemException(Exception e) { public void showSystemException(Exception e) {

View File

@ -235,7 +235,7 @@ public class TableComponentFactory implements ComponentFactory, Serializable {
((UpdateAble) module).updateRow(map); ((UpdateAble) module).updateRow(map);
loadData(); loadData();
} catch (HsarwebException e) { } catch (HsarwebException e) {
application.showUserException(e); application.showHsarWebException(e);
} }
} }
}); });
@ -294,7 +294,7 @@ public class TableComponentFactory implements ComponentFactory, Serializable {
((DeleteAble) module).deleteRow(map); ((DeleteAble) module).deleteRow(map);
loadData(); loadData();
} catch (HsarwebException e) { } catch (HsarwebException e) {
application.showUserException(e); application.showHsarWebException(e);
} }
} }
}); });