Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2003, 2007 s IT Solutions AT Spardat GmbH . All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: s IT Solutions AT Spardat GmbH - initial API and implementation /
 
 
 /*
  * Created on : 03.05.2003
  * Created by : s3595
  */
 package at.spardat.xma.boot.exc;
 

Author(s):
s3595 Chris Sch�fer (CGS)
Version:
0.1.0
 
 public class BootRuntimeException extends Exception {

    
The code of this notification. Defaults to 0 if not set.
 
     private int                 code_;

    
The message of this notification.
 
     private String              message_;

    
The detail exception
 
     private Throwable           detail_;

    
As for runtime exceptions: Indicates if this exception may be shown to the end user or not. This is just a hint for the presentation layer to decide if it should wrap this in another exception.
 
     protected boolean           showToEndUser_ = true;

    
For internal use only.
 
     protected BootRuntimeException () {
     }

    
Constructs and sets the message from a format string as defined in java.text.MessageFormat. The required parameters must be contained in the params array.

Parameters:
detail detail exception.
message string that either is a java.text.MessageFormat or not, depending on params.
l a java.util.Locale to format locale dependent data types or null if the params do not contain local specifics.
params the parameters of the message. If not null, message is expected to be a string compliant to MessageFormat.
 
     public BootRuntimeException (Throwable detailString messageLocale lObject[] params) {
         // set detail
         if (detail != nullsetDetail (detail);
         this.setMessage(messagelparams);
     }
     public BootRuntimeException (Throwable detailString message) {
         // set detail
         if (detail != nullsetDetail (detail);
         this.setMessage(messagenullnull);
     }

    
Constructs and sets the message of this from a two parameter java.text.MessageFormat compatible string.

Parameters:
messageFmt format string as defined in java.text.MessageFormat.
param1 first message parameter
param2 second message parameter
 
     public BootRuntimeException (String messageFmtObject param1Object param2) {
         this (messageFmtnullnew Object[]{param1,param2});
     }

    
Constructs and sets the message of this from a one parameter java.text.MessageFormat compatible string.

Parameters:
messageFmt format string as defined in java.text.MessageFormat.
param1 message parameter
 
    public BootRuntimeException (String messageFmtObject param1) {
        this (messageFmtnullnew Object[]{param1});
    }

    
Constructs and sets the message to the provided value.

Parameters:
message message text.
    public BootRuntimeException (String message) {
        this (messagenullnull);
    }

    
Constructs and sets the message from a format string as defined in java.text.MessageFormat. The required parameters must be contained in the params array.

Parameters:
message format string as defined in java.text.MessageFormat or plain text that is not a MessageFormat, depending on params
l a java.util.Locale to format locale dependent data types or null if the params do not contain local specifics.
params the parameters of the message. If params is null, message is not subject to MessageFormat-processing. If params is not null, message must be compliant to java.text.MessageFormat.
    public BootRuntimeException (String messageLocale lObject[] params) {
        setMessage (messagelparams);
    }

    
Sets the message from a format string as defined in java.text.MessageFormat. The required parameters must be contained in the params array.

Parameters:
message format string as defined in java.text.MessageFormat or plain text that is not a MessageFormat, depending on params
l a java.util.Locale to format locale dependent data types or null if the params do not contain local specifics.
params the parameters of the message. If params is null, message is not subject to MessageFormat-processing. If params is not null, message must be compliant to java.text.MessageFormat.
Returns:
this
    public BootRuntimeException setMessage (String messageLocale lObject[] params) {
        if (message == null) {
             = "";
            return this;
        }
        if (params == null) {
             = message;
        } else {
            try {
                MessageFormat       mf = new MessageFormat (message);
                if (l != nullmf.setLocale(l);
                 = mf.format (params);
            } catch (Exception ex) {
                 = ex.toString();
            }
        }
        return this;
    }

    
Sets the message of this from a one parameter java.text.MessageFormat compatible string.

Parameters:
messageFmt format string as defined in java.text.MessageFormat.
param1 message parameter
param2 message parameter
Returns:
this
    public BootRuntimeException setMessage (String messageFmtObject param1Object param2) {
        setMessage (messageFmtnullnew Object[]{param1param2});
        return this;
    }

    
Sets the message of this from a one parameter java.text.MessageFormat compatible string.

Parameters:
messageFmt format string as defined in java.text.MessageFormat.
param1 message parameter
Returns:
this
    public BootRuntimeException setMessage (String messageFmtObject param1) {
        setMessage (messageFmtnullnew Object[]{param1});
        return this;
    }

    
Constructs and sets the message to the provided value.

Parameters:
message text to set
Returns:
this
    public BootRuntimeException setMessage (String message) {
        setMessage (messagenullnull);
        return this;
    }

    
Sets the code. The code must be greater than zero.

See also:
getCode()
    public BootRuntimeException setCode (int code) {
        if (code <= 0) throw new IllegalArgumentException();
         = code;
        return this;
    }

    
Returns the code set. The code should be used to discrimitate amongst different kinds of notifications.
    public int getCode () {
        return ;
    }

    

Returns:
String message
    public String getMessage() {
        return  == null ? "" : ;
    }

    
Sets the detail exception. This usually is the technical exception that is the root cause of this exception.

Parameters:
detail the root cause technical exception.
    private void setDetail (Throwable detail) {
        initCause(detail);
         = detail;
    }

    
Returns the detail throwable. The returned value is null if no detail has been set or this has been migrated and the detail is not an BaseException.
    public Throwable getDetail () {
        return ;
    }
    public BootRuntimeException setShowToEndUserboolean bIn ){
         = bIn;
        return this;
    }
    public boolean getShowToEndUser( ){
        return ;
    }
New to GrepCode? Check out our FAQ X