1 10 11 package org.mule.umo.provider; 12 13 import org.mule.config.i18n.Message; 14 import org.mule.config.i18n.Messages; 15 import org.mule.umo.UMOException; 16 17 24 public class ConnectorException extends UMOException 25 { 26 29 private static final long serialVersionUID = 4729481487016346035L; 30 31 34 private transient UMOConnector connector; 35 36 40 public ConnectorException(Message message, UMOConnector connector) 41 { 42 super(generateMessage(message, connector)); 43 this.connector = connector; 44 } 45 46 51 public ConnectorException(Message message, UMOConnector connector, Throwable cause) 52 { 53 super(generateMessage(message, connector), cause); 54 this.connector = connector; 55 } 56 57 private static Message generateMessage(Message message, UMOConnector connector) 58 { 59 Message m = new Message(Messages.CONNECTOR_CAUSED_ERROR, connector); 60 if (message != null) 61 { 62 message.setNextMessage(m); 63 } 64 return m; 65 } 66 67 public UMOConnector getConnector() 68 { 69 return connector; 70 } 71 } 72 | Popular Tags |