Package com.starlight.intrepid.exception

Examples of com.starlight.intrepid.exception.ServerException


      }
      catch( Exception ex ) {
        LOG.info( "Unable to de-serialize method argument", ex );
        // Write an error and return nothing
        session.write( new InvokeReturnIMessage( call_id,
          new ServerException( "Error de-serializing method argument", ex ),
          true, null, null ) );
        return null;
      }
    }

    // PERSISTENT NAME
    String persistent_name = null;
    if ( has_persistent_name ) {
      try {
        if ( DEBUG ) {
          System.out.println( "(In) Position before persistent name: " +
            buffer.position() );
        }

        persistent_name = buffer.getString( STRING_DECODER );

        if ( DEBUG ) {
          System.out.println( "  decoded persistent name: " + persistent_name );
          System.out.println( "(In) Position after persistent name: " +
            buffer.position() );
        }
      }
      catch ( CharacterCodingException ex ) {
        LOG.info( "Error decoding object persistent name", ex );
        // Write an error and return nothing
        session.write( new InvokeReturnIMessage( call_id,
          new ServerException( "Error decoding object persistent name", ex ),
          true, null, null ) );
        return null;
      }
    }

    // USER CONTEXT
    UserContextInfo user_context = null;
    if ( has_user_context ) {
      try {
        if ( DEBUG ) {
          System.out.println( "(In) Position before user context: " +
            buffer.position() );
          System.out.println( "Hex dump after context position: " +
            buffer.getHexDump() );
        }

        user_context =
          ( UserContextInfo ) IoBufferSerialization.getObject( buffer );
      }
      catch( Exception ex ) {
        LOG.info( "Error de-serializing user context", ex );
        // Write an error and return nothing
        session.write( new InvokeReturnIMessage( call_id,
          new ServerException( "Error de-serializing user context", ex ),
          true, null, null ) );
        return null;
      }
    }
View Full Code Here

TOP

Related Classes of com.starlight.intrepid.exception.ServerException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.