1 /*******************************************************************************
\r
2 * Copyright (c) 2007, 2014 Association for Decentralized Information Management
\r
3 * in Industry THTH ry.
\r
4 * All rights reserved. This program and the accompanying materials
\r
5 * are made available under the terms of the Eclipse Public License v1.0
\r
6 * which accompanies this distribution, and is available at
\r
7 * http://www.eclipse.org/legal/epl-v10.html
\r
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 * Semantum Oy - optional fillStackTrace
\r
12 *******************************************************************************/
\r
13 package org.simantics;
\r
16 * @author Toni Kalajainen
\r
18 public class PlatformException extends Exception {
\r
20 private static final long serialVersionUID = -2967261259650645038L;
\r
22 private final boolean fillStackTrace;
\r
24 public PlatformException() {
\r
28 public PlatformException(String message) {
\r
29 this(message, true);
\r
32 public PlatformException(Throwable cause) {
\r
36 public PlatformException(String message, Throwable cause) {
\r
37 this(message, cause, true);
\r
41 * @since Simantics 1.15
\r
43 public PlatformException(boolean fillStackTrace) {
\r
44 this.fillStackTrace = fillStackTrace;
\r
48 * @since Simantics 1.15
\r
50 public PlatformException(String message, boolean fillStackTrace) {
\r
52 this.fillStackTrace = fillStackTrace;
\r
56 * @since Simantics 1.15
\r
58 public PlatformException(Throwable cause, boolean fillStackTrace) {
\r
60 this.fillStackTrace = fillStackTrace;
\r
64 * @since Simantics 1.15
\r
66 public PlatformException(String message, Throwable cause, boolean fillStackTrace) {
\r
67 super(message, cause);
\r
68 this.fillStackTrace = fillStackTrace;
\r
72 public synchronized Throwable fillInStackTrace() {
\r
73 return fillStackTrace ? super.fillInStackTrace() : this;
\r