Package org.jostraca.util

Examples of org.jostraca.util.RecordingUserMessageHandler.error()


    catch( StandardException se ) { throw se; }
    catch( Exception e ) {

      // REVIEW: this is a hack - need to move formatting out of RecordingUserMessageHandler
      RecordingUserMessageHandler rumh = new RecordingUserMessageHandler();
      rumh.error( e );
      throw new JostracaException( rumh.toString() );
    }
  }

View Full Code Here


    assertEquals( "DEBUG: debug01\nDEBUG: debug02\n", umh.toString( ) );
    assertEquals( "DEBUG: debug01\nDEBUG: debug02\n", umh.toString( UserMessageHandler.DEBUG ) );

    umh.info"info01" );
    umh.warn"warn01" );
    umh.error( "error01" );
    umh.fatal( "fatal01" );

    assertEquals( "DEBUG: debug01\nDEBUG: debug02\n", umh.toString( UserMessageHandler.DEBUG ) );
    assertEquals( "INFO: info01\n", umh.toString( UserMessageHandler.INFO ) );
    assertEquals( "WARN: warn01\n", umh.toString( UserMessageHandler.WARN ) );
View Full Code Here


  public void testExceptions() {
    RecordingUserMessageHandler umh = new RecordingUserMessageHandler();
    umh.setThreshold( UserMessageHandler.INFO );
    umh.error( new StandardException( StandardException.CODE_user, "se01") );

    System.out.println( umh.toString() );

    StandardException se02s = new StandardException( StandardException.CODE_user, "se02s" );
    StandardException se02  = new StandardException( StandardException.CODE_user, "se02", se02s );
View Full Code Here

    System.out.println( umh.toString() );

    StandardException se02s = new StandardException( StandardException.CODE_user, "se02s" );
    StandardException se02  = new StandardException( StandardException.CODE_user, "se02", se02s );
    umh.error( se02 );

    System.out.println( umh.toString() );

  }
View Full Code Here

    catch( StandardException se ) { throw se; }
    catch( Exception e ) {

      // REVIEW: this is a hack - need to move formatting out of RecordingUserMessageHandler
      RecordingUserMessageHandler rumh = new RecordingUserMessageHandler();
      rumh.error( e );
      throw new JostracaException( rumh.toString() );
    }
  }

 
View Full Code Here

    catch( StandardException se ) { throw se; }
    catch( Exception e ) {

      // REVIEW: this is a hack - need to move formatting out of RecordingUserMessageHandler
      RecordingUserMessageHandler rumh = new RecordingUserMessageHandler();
      rumh.error( e );
      throw new JostracaException( rumh.toString() );
    }
  }

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.