]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Java/Source/Common/org/tianocore/common/exception/EdkException.java
Restructuring for better separation of Tool packages.
[mirror_edk2.git] / Tools / Java / 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
19 package org.tianocore.common.exception;
20
21 public class EdkException extends Exception {
22 static final long serialVersionUID = -8494188017252114029L;
23
24 public static boolean isPrintStack = false;
25
26 public EdkException(String message) {
27 super("[EdkException]:" + message);
28 }
29
30 public EdkException(String message, boolean traceStack) {
31 super(message);
32
33 }
34
35 public EdkException(){
36 super();
37 }
38
39 public EdkException(Exception e, String message){
40 super("[EdkException]:" + message);
41 if (isPrintStack){
42 this.setStackTrace(e.getStackTrace());
43 }
44 e.printStackTrace();
45 }
46 public static void setIsprintStack (boolean flag){
47 isPrintStack = flag;
48 }
49 }