This is how exceptions are handled
This is how WcmController.java, the "Controller" part of FileNet Workplace's implementation of MVC pattern, handles exceptions:
First, declare this:
Then, in ConfigurePage function, do this:
There is no proper exception handling in Workplace. Should I send this piece to The Daily WTF?
Technorati Tags: Filenet, code
First, declare this:
private Exception configureWindowIdException = null;
Then, in ConfigurePage function, do this:
What about good old try-catch?
public void configurePage(ServletContext applicationValue, HttpServletRequest request, long windowIdMode)
throws Exception
{
... skipped ...
configureWindowId(request);
// If configureWindowId constructed an exception, throw it.
if ( configureWindowIdException != null )
{
if ( !sp.isSignedIn() )
{
// We attempted to propogate a window Id when not signed in
// probably the result of signing out of an info page.
// Don't throw. Fix the windowId to mainWindow instead.
//
WindowID assignedId = new WindowID(null);
WindowID currentId = new WindowID(null);
assignWindowId(assignedId, currentId, false);
configureWindowState();
postProcessWindowId(assignedId, currentId, currentId,
false, false, false, false, false);
}
else
throw configureWindowIdException;
}
... skipped ...
}
There is no proper exception handling in Workplace. Should I send this piece to The Daily WTF?
Technorati Tags: Filenet, code









0 Comments:
Post a Comment
<< Home