public InvalidExpressionException(String expression, String message) { super(CoreMessages.createStaticMessage(message + ". Offending expression string is: " + expression)); this.expression = expression; this.message = message; }
public ResponseValidatorException(String message, MuleEvent event) { super(CoreMessages.createStaticMessage(message), event); } }
/** * @param cause the exception that cause this exception to be thrown * @param component the object that failed during a lifecycle method call */ public LifecycleException(Throwable cause, Object component) { super(CoreMessages.createStaticMessage(cause.getMessage()), cause, component); this.component = component; }
@Deprecated public SoapFaultException(MuleEvent event, QName faultCode, QName subCode, String message, Element detail, MessageProcessor failingMessageProcessor) { super(CoreMessages.createStaticMessage(message), event, failingMessageProcessor); this.faultCode = faultCode; this.subCode = subCode; this.detail = detail; }
private PersistentObjectStorePartition<T> getPartitionObjectStore(String partitionName) throws ObjectStoreException { if (!partitionsByName.containsKey(partitionName)) { throw new ObjectStoreException(CoreMessages.createStaticMessage("No partition named: " + partitionName)); } return partitionsByName.get(partitionName); }
protected Class getKeyType() { throw new MuleRuntimeException(CoreMessages.createStaticMessage("Transaction type: " + this.getClass().getName() + " doesn't support supports(..) method")); } }
@Override public void preProcess(PropertyConfiguration config, Element element) { if (element.hasAttribute("name")) { throw new MuleRuntimeException(CoreMessages.createStaticMessage("name attribute on exception strategy is only allowed on global exception strategies")); } } };
@Override public void preProcess(PropertyConfiguration config, Element element) { if (element.hasAttribute("name")) { throw new MuleRuntimeException(CoreMessages.createStaticMessage("name attribute on exception strategy is only allowed on global exception strategies")); } } };
private int retrieveMaximumHeaderSectionSize() { try { return valueOf(getProperty(MAXIMUM_HEADER_SECTION_SIZE_PROPERTY_KEY, String.valueOf(DEFAULT_MAX_HTTP_PACKET_HEADER_SIZE))); } catch (NumberFormatException e) { throw new MuleRuntimeException(CoreMessages.createStaticMessage(String.format("Invalid value %s for %s configuration", getProperty(MAXIMUM_HEADER_SECTION_SIZE_PROPERTY_KEY), MAXIMUM_HEADER_SECTION_SIZE_PROPERTY_KEY)), e); } }
private void verifyConnectionsParameters() throws InitialisationException { if (maxConnections < UNLIMITED_CONNECTIONS || maxConnections == 0) { throw new InitialisationException(CoreMessages.createStaticMessage("The maxConnections parameter only allows positive values or -1 for unlimited concurrent connections."), this); } if (!usePersistentConnections) { connectionIdleTimeout = 0; } }
private void failIfHeaderDoesNotSupportMultipleValues(String headerName) { if (calculatedHeadersNames.contains(headerName)) { throw new MuleRuntimeException(CoreMessages.createStaticMessage("Header: " + headerName + " does not support multiple values")); } }
private int retrieveMaximumHeaderSectionSize() { try { return valueOf(getProperty(CUSTOM_MAX_HTTP_PACKET_HEADER_SIZE, String.valueOf(DEFAULT_MAX_HTTP_PACKET_HEADER_SIZE))); } catch (NumberFormatException e) { throw new MuleRuntimeException(CoreMessages.createStaticMessage(String.format("Invalid value %s for %s configuration.", getProperty(CUSTOM_MAX_HTTP_PACKET_HEADER_SIZE), CUSTOM_MAX_HTTP_PACKET_HEADER_SIZE)), e); } }
protected <T> T getOperationResourceFactory() { throw new MuleRuntimeException(CoreMessages.createStaticMessage("Operation not supported by dispatcher")); }
private void validateOnlyLastAcceptsAll() { for (int i = 0; i < exceptionListeners.size() - 1; i++) { MessagingExceptionHandlerAcceptor messagingExceptionHandlerAcceptor = exceptionListeners.get(i); if (messagingExceptionHandlerAcceptor.acceptsAll()) { throw new MuleRuntimeException(CoreMessages.createStaticMessage("Only last exception strategy inside <choice-exception-strategy> can accept any message. Maybe expression attribute is empty.")); } } }
public static ArtifactType createFromString(String artifactTypeAsString) { for (ArtifactType artifactType : values()) { if (artifactType.artifactTypeAsString.equals(artifactTypeAsString)) { return artifactType; } } throw new MuleRuntimeException(CoreMessages.createStaticMessage("No artifact type found for value: " + artifactTypeAsString)); } }
public static Operation createFromByteRepresentation(byte byteRepresentation) { for (Operation operation : values()) { if (operation.byteRepresentation == byteRepresentation) { return operation; } } throw new MuleRuntimeException(CoreMessages.createStaticMessage("Unexpected byte representation value: " + byteRepresentation)); } }
private ConnectorOperationLocator getConnectorMessageProcessLocator() { if (connectorOperatorLocator == null) { this.connectorOperatorLocator = muleContext.getRegistry().get(OBJECT_CONNECTOR_MESSAGE_PROCESSOR_LOCATOR); if (this.connectorOperatorLocator == null) { throw new MuleRuntimeException(CoreMessages.createStaticMessage("Could not find required %s in the registry under key %s", ConnectorOperationLocator.class.getName(), OBJECT_CONNECTOR_MESSAGE_PROCESSOR_LOCATOR)); } } return connectorOperatorLocator; }
protected boolean isProcessAsync(MuleEvent event) throws MessagingException { if (!canProcessAsync(event)) { throw new MessagingException( CoreMessages.createStaticMessage(SYNCHRONOUS_NONBLOCKING_EVENT_ERROR_MESSAGE), event, this); } return doThreading && canProcessAsync(event); }
protected MessageProcessor lookupMessageProcessor(String processorName, MuleContext muleContext) { Object processor = muleContext.getRegistry().lookupObject(processorName); if (!(processor instanceof MessageProcessor)) { throw new ExpressionRuntimeException(CoreMessages.createStaticMessage("No MessageProcessor '" + processorName + "' found.")); } return (MessageProcessor) processor; }
public SoapFaultException(MuleEvent event, SoapFault soapFault, MessageProcessor failingMessageProcessor) { super(CoreMessages.createStaticMessage(soapFault.getMessage()), event, soapFault, failingMessageProcessor); this.faultCode = soapFault.getFaultCode(); this.subCode = soapFault.getSubCode(); this.detail = soapFault.getDetail(); }