]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics/src/org/simantics/UnhandledExceptionService.java
Simantics Console
[simantics/platform.git] / bundles / org.simantics / src / org / simantics / UnhandledExceptionService.java
diff --git a/bundles/org.simantics/src/org/simantics/UnhandledExceptionService.java b/bundles/org.simantics/src/org/simantics/UnhandledExceptionService.java
new file mode 100644 (file)
index 0000000..d094851
--- /dev/null
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2019 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Semantum Oy - initial API and implementation
+ *******************************************************************************/
+package org.simantics;
+
+import java.util.function.Consumer;
+
+/**
+ * @author Antti Villberg
+ */
+public interface UnhandledExceptionService {
+
+       void registerHandler(Consumer<Throwable> handler);
+       void handle(Throwable t);
+
+}