View Javadoc

1   /*
2   Copyright 2010 James Pether Sörling Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 
3   	$Id
4   */
5   
6   package com.hack23.cia.web.action.common;
7   
8   /***
9    * The Class ApplicationErrorAction.
10   */
11  public class ApplicationErrorAction extends AbstractAction {
12  
13      /*** The Constant serialVersionUID. */
14      private static final long serialVersionUID = 1L;
15  
16      /*** The error message. */
17      private final String errorMessage;
18  
19      /*** The stack trace elements. */
20      private final StackTraceElement[] stackTraceElements;
21      
22      /***
23       * Instantiates a new application error action.
24       *
25       * @param stackTraceElements the stack trace elements
26       * @param errorMessage the error message
27       */
28      public ApplicationErrorAction(final StackTraceElement[] stackTraceElements,final String errorMessage) {
29          super(ActionCategory.Application);
30          this.stackTraceElements = stackTraceElements;
31          this.errorMessage = errorMessage;
32      }
33  
34  
35      /***
36       * Gets the error message.
37       *
38       * @return the error message
39       */
40      public final String getErrorMessage() {
41          return errorMessage;
42      }
43  
44      /***
45       * Gets the stack trace elements.
46       *
47       * @return the stack trace elements
48       */
49      public final StackTraceElement[] getStackTraceElements() {
50          return stackTraceElements;
51      }
52  
53  }