ostore.util
Class Carp

java.lang.Object
  |
  +--ostore.util.Carp

public abstract class Carp
extends Object

A convenience class for generating error messages, complete with "carp" and "croak", borrowed from PERL.

Version:
$Id: Carp.java,v 1.9 2002/04/05 20:29:23 geels Exp $
Author:
Dennis Geels

Constructor Summary
Carp()
           
 
Method Summary
static void carp(String msg)
          Print an error message to standard error.
static void carp(Throwable e)
          Print an exception's message to standard error.
static void croak()
          Kill the whole jvm.
static void croak(String msg)
          Print an error message to standard error and exit.
static void croak(Throwable e)
          Print an exception's message to standard error and exit.
static void die()
          Exit with an error code.
static void die(String msg)
          Print an error message and stack trace to standard error and exit.
static void die(Throwable e)
          Print an exception's message and stack trace to standard error and exit.
static void dumpStack()
          Print out the stack trace of the current thread.
static void error(String msg)
          Print an error message and current stack trace to standard error.
static void error(Throwable e)
          Print an exception's message and stack trace to standard error.
static void out(String msg)
          Print a message to standard out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Carp

public Carp()
Method Detail

out

public static void out(String msg)
Print a message to standard out.

carp

public static void carp(String msg)
Print an error message to standard error.

carp

public static void carp(Throwable e)
Print an exception's message to standard error.

error

public static void error(String msg)
Print an error message and current stack trace to standard error.

error

public static void error(Throwable e)
Print an exception's message and stack trace to standard error.

croak

public static void croak()
Kill the whole jvm.

croak

public static void croak(String msg)
Print an error message to standard error and exit.

croak

public static void croak(Throwable e)
Print an exception's message to standard error and exit.

die

public static void die()
Exit with an error code.

die

public static void die(String msg)
Print an error message and stack trace to standard error and exit.

die

public static void die(Throwable e)
Print an exception's message and stack trace to standard error and exit.

dumpStack

public static void dumpStack()
Print out the stack trace of the current thread. The stack trace will include the call to Carp.dumpStack.