Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » How can i handle Exception(eg. BirtException) ?(Display Error Message)
icon4.gif  How can i handle Exception(eg. BirtException) ? [message #902968] Tue, 21 August 2012 12:54 Go to next message
Steven Sinclair is currently offline Steven Sinclair
Messages: 2
Registered: August 2012
Junior Member
Rolling Eyes

I integrate birt report 4.2.0 with my webapp ,when user input some value in condition field,eg. numeric field.user input "quantity", not 1 or 2 and etc,birt throws exception.

i use error-page element in web.xml,but that had no effect on these exception at all.

error stack displayed on web page.Face to end user. unfriendliness.

Anyone can give me some idea? How to uniformly handle these Exception and friendly for end user.

Thank you.
Re: How can i handle Exception(eg. BirtException) ? [message #903075 is a reply to message #902968] Tue, 21 August 2012 20:14 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Do you mean when a user enters a parameter value? If you are using the
api you can always check for an error on the task:

finally
{
if ( !task.getErrors( ).isEmpty( ) )

{

for ( Object e : task.getErrors( ) )

{
//Check here
( (Exception) e ).printStackTrace( );

}

}

Jason

On 8/21/2012 8:54 AM, Steven Sinclair wrote:
> :roll:
> I integrate birt report 4.2.0 with my webapp ,when user input some value
> in condition field,eg. numeric field.user input "quantity", not 1 or 2
> and etc,birt throws exception.
>
> i use error-page element in web.xml,but that had no effect on these
> exception at all.
>
> error stack displayed on web page.Face to end user. unfriendliness.
>
> Anyone can give me some idea? How to uniformly handle these Exception
> and friendly for end user.
>
> Thank you.
Re: How can i handle Exception(eg. BirtException) ? [message #903100 is a reply to message #903075] Wed, 22 August 2012 01:21 Go to previous messageGo to next message
Steven Sinclair is currently offline Steven Sinclair
Messages: 2
Registered: August 2012
Junior Member
Thank you for your reply.

index.php/fa/11265/0/
as you see above,the red rectangle.there user must enter numeric ,but user enter characters.then error happened. as you can see below.

index.php/fa/11266/0/

[Updated on: Wed, 22 August 2012 01:23]

Report message to a moderator

Re: How can i handle Exception(eg. BirtException) ? [message #903230 is a reply to message #903100] Wed, 22 August 2012 15:29 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Take a look at this thread.

http://www.eclipse.org/forums/index.php/m/699699/

Jason


On 8/21/2012 9:21 PM, Steven Sinclair wrote:
> Thank you for your reply.
>
>
> as you see above,the red rectangle.there user must enter numeric ,but user enter characters.then error happened. as you can see below.
>
>
Previous Topic:Unfinished Report
Next Topic:EngineConfig.setFontConfig does not work
Goto Forum:
  


Current Time: Sun Sep 21 14:26:10 GMT 2014

Powered by FUDForum. Page generated in 0.01768 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software