@Override public void run() { try { runInitialize(); if ( _stage != null ) { runInitialize( _stage ); } } catch ( InitializeException e ) { LOGGER.error( "Exception during initialization: " + ExceptionUtility.toMessage( e ), e ); } }
/** * {@inheritDoc} */ @Override public synchronized void close() throws CloseException { super.close(); try { _objectOutputStream.close(); } catch ( IOException aException ) { if ( !ExceptionUtility.isThrownAsOfAlreadyClosed( aException ) ) throw new CloseException( "Unable to close stream <" + _objectOutputStream + ">.", aException ); } }
/** * This hook method allows you to handle any exceptions being thrown by an * event listener whilst invoking a given event. * * @param aException The exception thrown by the given event listener. * @param aObserver The listener which caused the exception. * @param aEvent The event for which the exception was caused. * @param aExecutionStrategy the execution strategy */ protected void doHandleEventListenerException( Exception aException, O aObserver, EV aEvent, ExecutionStrategy aExecutionStrategy ) { warn( "Caught an unexpected exception while invoking event observer instances with strategy \"" + aExecutionStrategy + "\" with message: " + ExceptionUtility.toMessage( aException ), aException ); }
/** * {@inheritDoc} */ @Override public synchronized void close() throws CloseException { super.close(); try { _objectOutputStream.close(); } catch ( IOException aException ) { if ( !ExceptionUtility.isThrownAsOfAlreadyClosed( aException ) ) throw new CloseException( "Unable to close stream <" + _objectOutputStream + ">.", aException ); } }
throw new CloneNotSupportedException( ExceptionUtility.toMessage( e ) );
/** * {@inheritDoc} */ @Override public synchronized void close() throws CloseException { super.close(); try { _objectOutputStream.close(); } catch ( IOException aException ) { if ( !ExceptionUtility.isThrownAsOfAlreadyClosed( aException ) ) throw new CloseException( "Unable to close stream <" + _objectOutputStream + ">.", aException ); } }
/** * {@inheritDoc} */ @Override public String toString() { try { return toString( _encoding ); } catch ( IOException e ) { throw new HiddenException( ExceptionUtility.toMessage( e ), e ); } }
/** * {@inheritDoc} */ @Override public synchronized void close() throws CloseException { super.close(); try { _objectOutputStream.close(); } catch ( IOException aException ) { if ( !ExceptionUtility.isThrownAsOfAlreadyClosed( aException ) ) throw new CloseException( "Unable to close stream <" + _objectOutputStream + ">.", aException ); } }
/** * Run. */ @Override public void run() { try { digest( _job ); } catch ( DigestException aException ) { if ( !(_job instanceof SignOffProxyMessage) || isOpened() ) LOGGER.warn( "Unable to digest the job \"" + _job.getClass().getName() + "\" as of a digest exception: \"" + ExceptionUtility.toMessage( aException ) + "\"", aException ); } } }
/** * {@inheritDoc} */ @Override public synchronized void close() throws CloseException { if ( !isClosed() ) { super.close(); try { _inputStream.close(); } catch ( IOException e ) { if ( !ExceptionUtility.isThrownAsOfAlreadyClosed( e ) ) throw new CloseException( "Unable to close receiver, connection status is <" + getConnectionStatus() + ">.", e ); } } }
/** * Run. */ @Override public void run() { try { Object returnValue = _method.invoke( _providedObject, _argumentArray ); _returnValue = SerializeUtility.toSerializable( returnValue ); } catch ( InvocationTargetException aInvocationTargetException ) { LOGGER.warn( ExceptionUtility.toMessage( aInvocationTargetException ), aInvocationTargetException ); _returnThrowable = aInvocationTargetException.getTargetException(); } catch ( IllegalAccessException aIllegalAccessException ) { LOGGER.warn( ExceptionUtility.toMessage( aIllegalAccessException ), aIllegalAccessException ); throw new InvalidMethodRequestRuntimeException( aIllegalAccessException ); } catch ( Throwable aThrowable ) { LOGGER.warn( ExceptionUtility.toMessage( aThrowable ), aThrowable ); _returnThrowable = aThrowable; } finally { _hasResult = true; synchronized ( this ) { notifyAll(); } } }
/** * {@inheritDoc} */ @Override public synchronized void close() throws CloseException { if ( !isClosed() ) { super.close(); try { _inputStream.close(); } catch ( IOException e ) { if ( !ExceptionUtility.isThrownAsOfAlreadyClosed( e ) ) throw new CloseException( "Unable to close receiver, connection status is <" + getConnectionStatus() + ">.", e ); } } }
warn( "Caught an unexpected exception while invoking and joining event observer instances with message: " + ExceptionUtility.toMessage( e ), e );
if ( ExceptionUtility.isThrownAsOfAlreadyClosed( ioe ) ) { super.close();
/** * {@inheritDoc} */ @Override public void destroy() { if ( !_isDestroyed ) { try { close(); } catch ( CloseException e ) { LOGGER.warn( "Destroying failed as of: " + ExceptionUtility.toMessage( e ), e ); } finally { _executorService.shutdownNow(); try { _transceiver.close(); } catch ( CloseException e ) { LOGGER.warn( "Destroying failed as of: " + ExceptionUtility.toMessage( e ), e ); } finally { _isDestroyed = true; } } } }
if ( ExceptionUtility.isThrownAsOfAlreadyClosed( ioe ) ) { super.close();
throw new IllegalStateException( ExceptionUtility.toMessage( e ), e );
if ( !ExceptionUtility.isThrownAsOfAlreadyClosed( aException ) ) throw new OpenException( "Unable to open the I/O stream receiver as of a causing exception.", aException );
/** * {@inheritDoc} */ @Override public String toEncrypted( String aInput ) throws EncryptionException { // TODO: What to do when already encrypted? if ( ForwardSecrecyUtility.hasEncryptionPattern( aInput ) ) { LOGGER.warn( "The provided text may have already been encrypted with a cipher UID beginning with \"" + aInput.substring( 0, ForwardSecrecyUtility.CIPHER_UID_TIMESTAMP_LENGTH ) + "...\"!" ); } try { return _cipherUid + Delimiter.CIPHER_UID.getChar() + _stringEncryptor.encrypt( aInput ); } catch ( EncryptionOperationNotPossibleException | EncryptionInitializationException e ) { throw new EncryptionException( ExceptionUtility.toMessage( e ), e ); } }
if ( !ExceptionUtility.isThrownAsOfAlreadyClosed( aException ) ) throw new OpenException( "Unable to open the I/O stream receiver as of a causing exception.", aException );