Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

JobRequestException Class Reference

Inheritance diagram for JobRequestException:

Inheritance graph
[legend]
Collaboration diagram for JobRequestException:

Collaboration graph
[legend]
List of all members.

Detailed Description

Exception thrown by Job Request function. May contain a vector of parameters missing from a JobRequest. May wrap an underlying exception such as JetWebDBException.

Author:
J & S Butterworth
Version:
$date$ $revision$

Definition at line 18 of file JobRequestException.java.


Public Member Functions

String getMessage ()
void printStackTrace (PrintWriter s)
void printStackTrace (PrintStream s)
Exception getOriginalException ()

Protected Attributes

String data = ""
Exception originalException

Package Functions

 JobRequestException (String msg)
 JobRequestException (Vector missing)
 JobRequestException (Exception e)

Private Attributes

Vector missingParameters = new Vector()

Constructor & Destructor Documentation

JobRequestException String  msg  )  [package]
 

Constructor takes an error message string

Parameters:
msg 

Definition at line 28 of file JobRequestException.java.

00028                                    {        
00029     super(msg,"");
00030     } 

JobRequestException Vector  missing  )  [package]
 

Constructor takes a vector of missing parameters (Strings)

Parameters:
missing 

Definition at line 37 of file JobRequestException.java.

References JobRequestException.missingParameters.

00037                                        {
00038     super("Job Request has missing parameters","");
00039     missingParameters = missing;
00040     }

JobRequestException Exception  e  )  [package]
 

Constructor wraps an underlying exception

Parameters:
e - original exception

Definition at line 47 of file JobRequestException.java.

00047                                     {
00048     super(e);
00049     }


Member Function Documentation

String getMessage  ) 
 

Overrides super to write out missing parameters (if any exist)

Returns:
msg

Reimplemented from JetWebException.

Definition at line 55 of file JobRequestException.java.

References JetWebException.getOriginalException(), and JobRequestException.missingParameters.

00055                               {
00056     StringBuffer b = new StringBuffer();
00057 
00058     if (getOriginalException()!=null) {
00059         b.append(getOriginalException().getMessage());
00060     } else {
00061         b.append(super.getMessage());
00062     }
00063 
00064     int noMissing = missingParameters.size();
00065     if (noMissing >0){
00066         b.append("\n");
00067         b.append(noMissing);
00068         b.append(" PARAMETERS MISSING:");
00069         Enumeration miss = missingParameters.elements();
00070         int count = 0;
00071         while (miss.hasMoreElements()){
00072         if (count>0) b.append(",");
00073         b.append((String)miss.nextElement());
00074         count++;
00075         }
00076     }
00077     return b.toString();
00078     }

Exception getOriginalException  )  [inherited]
 

gets the original exception this exception wraps

Returns:
exception

Definition at line 107 of file JetWebException.java.

Referenced by JobRequestException.getMessage(), and JetWebDBException.getMessage().

00107                                            {
00108     return originalException;
00109     }

void printStackTrace PrintStream  s  )  [inherited]
 

This overrides super to print the original exception stack trace, if there is one. The message and stack trace can be obtained from it.

Parameters:
PrintStream 

Definition at line 67 of file JetWebException.java.

References JetWebException.originalException.

00067                                               {
00068     if (originalException!=null){
00069         originalException.printStackTrace(s);
00070     } else {
00071         super.printStackTrace(s);
00072     }
00073     }

void printStackTrace PrintWriter  s  )  [inherited]
 

This overrides super to print the original exception stack trace, if there is one. The message and stack trace can be obtained from it.

Parameters:
PrintWriter 

Definition at line 54 of file JetWebException.java.

References JetWebException.originalException.

00054                                               {
00055     if (originalException!=null){
00056         originalException.printStackTrace(s);
00057     } else {
00058         super.printStackTrace(s);
00059     }
00060     }


Member Data Documentation

String data = "" [protected, inherited]
 

Definition at line 16 of file JetWebException.java.

Referenced by JetWebException.getMessage().

Vector missingParameters = new Vector() [private]
 

Definition at line 20 of file JobRequestException.java.

Referenced by JobRequestException.getMessage(), and JobRequestException.JobRequestException().

Exception originalException [protected, inherited]
 

Definition at line 17 of file JetWebException.java.

Referenced by JetWebException.getMessage(), and JetWebException.printStackTrace().


The documentation for this class was generated from the following file:

Generated Wed Jan 17 09:14:27 GMT 2007