HTML/CSS Service

Showcase

2 comments0 views
1 Star2 Stars

Exception Handling with BlazeDS and Flex

Category: Flex Error    |    2,266 views    |    2 Comments

 

Create a Java Class that extends RuntimeException.

package com.flex3.exception;
public class FlexException extends RuntimeException
{
public FlexException(String message)
{
super(message);
}
}

2. Create a matching flex class called FlexException, and put the usual RemoteObject tag in their so BlazeDS will know what to look for. Also remember in actionscript, each object must be instantiated at least once, so be sure to do that somewhere with FlexException.

3. In Java, whenever there is a known exception, or some error where the end user needs to be shown a message, throw a FlexException and pass in the message the user should see in the constructor. Let’s say the user just entered an invalid password. throw new FlexException(”Wrong Password Entered, Please Try Again.”); Read more…

Share/Save/Bookmark