]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/Common/org/tianocore/common/exception/EdkException.java
bd143d860af6cc0e4f869bda171b4edfd66d9248
[mirror_edk2.git] / Tools / Source / Common / org / tianocore / common / exception / EdkException.java
1 /*++
2
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13 EdkException.java
14
15 Abstract:
16
17 --*/
18 package org.tianocore.exception;
19
20 public class EdkException extends Exception {
21 static final long serialVersionUID = -8494188017252114029L;
22 private StackTraceElement[] stackTrace;
23 public static boolean isPrintStack = false;
24
25 public EdkException(String message) {
26 super("[EdkException]:" + message);
27 }
28
29 public EdkException(String message, boolean traceStack) {
30 super(message);
31
32 }
33
34 public EdkException(){
35 super();
36 }
37
38 public EdkException(Exception e, String message){
39 super("[EdkException]:" + message);
40 if (isPrintStack){
41 this.setStackTrace(e.getStackTrace());
42 }
43 e.printStackTrace();
44 }
45 public static void setIsprintStack (boolean flag){
46 isPrintStack = flag;
47 }
48 }