--- /dev/null
+/*++\r
+\r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+Module Name:\r
+ EdkException.java\r
+\r
+Abstract:\r
+\r
+--*/\r
+package org.tianocore.exception;\r
+\r
+public class EdkException extends Exception {\r
+ static final long serialVersionUID = -8494188017252114029L;\r
+ private StackTraceElement[] stackTrace;\r
+ public static boolean isPrintStack = false;\r
+\r
+ public EdkException(String message) {\r
+ super("[EdkException]:" + message);\r
+ }\r
+\r
+ public EdkException(String message, boolean traceStack) {\r
+ super(message);\r
+ \r
+ }\r
+ \r
+ public EdkException(){\r
+ super();\r
+ }\r
+ \r
+ public EdkException(Exception e, String message){\r
+ super("[EdkException]:" + message);\r
+ if (isPrintStack){\r
+ this.setStackTrace(e.getStackTrace());\r
+ }\r
+ e.printStackTrace();\r
+ }\r
+ public static void setIsprintStack (boolean flag){\r
+ isPrintStack = flag;\r
+ }\r
+}\r