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