Hi !

 

                    I am unMarshalling in a try catch using castor.

                      For testing purpose I removed some required Fields

                      From the XMLInput and then marshaled it.

 

                      I was expecting the control to go the catch clause 1

                      But instead the control goes to 2  and the MarshalException

                      Inturn throws the validation Exception with the name of the

                      required field that is missing etc.

                      Why does this happen ?

 

                         Try{

 

                             // I am unmarshalling here using  CASTOR                          

                        }catch (ValidationException e) {           ------ 1                       

                                   logger.error(e);

                                   throw new CUSTOMException("UnMarshall Exception",e);

                        }

                        catch (MarshalException e) {            ------ 2

                                    logger.error("An Error Occured While UNMarshalling",e);                               

                                    throw new CUSTOMException ("UnMarshall Exception",e);

                        } catch (MappingException e) {    ------ 3

                                    //An exception indicating an invalid mapping error.

                                    logger.error("Mapping Excpetion",e);

                                    throw new CUSTOMException (e);

                       }

 

Hope to get a reply !!!

 

Regards

Shalini

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Reply via email to