private void checkBusExists ( boolean condition , String foreignBusName , boolean linkError , Throwable cause ) throws SINotPossibleInCurrentConfigurationException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "checkBusExists" , new Object [ ] { new Boolean ( condition ) , foreignBusName , Boolean . valueOf ( linkError ) , cause } ) ; if ( ! condition ) { String errorMsg = "DELIVERY_ERROR_SIRC_38" ; int reason = SIRCConstants . SIRC0038_FOREIGN_BUS_NOT_FOUND_ERROR ; if ( linkError && cause != null ) { reason = SIRCConstants . SIRC0041_FOREIGN_BUS_LINK_NOT_DEFINED_ERROR ; errorMsg = "DELIVERY_ERROR_SIRC_41" ; } else if ( cause != null ) { reason = SIRCConstants . SIRC0039_FOREIGN_BUS_NOT_FOUND_ERROR ; errorMsg = "DELIVERY_ERROR_SIRC_39" ; } SIMPNotPossibleInCurrentConfigurationException e = null ; if ( cause == null ) { e = new SIMPNotPossibleInCurrentConfigurationException ( nls_cwsik . getFormattedMessage ( errorMsg , new Object [ ] { foreignBusName , messageProcessor . getMessagingEngineName ( ) , messageProcessor . getMessagingEngineBus ( ) } , null ) ) ; e . setExceptionInserts ( new String [ ] { foreignBusName , messageProcessor . getMessagingEngineName ( ) , messageProcessor . getMessagingEngineBus ( ) } ) ; e . setExceptionReason ( reason ) ; } else { e = new SIMPNotPossibleInCurrentConfigurationException ( nls_cwsik . getFormattedMessage ( errorMsg , new Object [ ] { foreignBusName , messageProcessor . getMessagingEngineName ( ) , messageProcessor . getMessagingEngineBus ( ) , SIMPUtils . getStackTrace ( cause ) } , null ) ) ; e . setExceptionInserts ( new String [ ] { foreignBusName , messageProcessor . getMessagingEngineName ( ) , messageProcessor . getMessagingEngineBus ( ) , SIMPUtils . getStackTrace ( cause ) } ) ; e . setExceptionReason ( reason ) ; } SibTr . exception ( tc , e ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "checkBusExists" , e ) ; throw e ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "checkBusExists" ) ; }
Asserts that a Bus exists . Throws out the appropriate exception if the condition has failed .