From 20c81748688547c1b13686f15c65fbb1d60d81a0 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Thu, 12 Jul 2012 14:52:36 +0200 Subject: Suspend transition now can carry an optional 'Errors' outcome where client processes can record the reason for the suspension. Errors XML is marshalled ErrorInfo. UserCodeProcess automatically sends fatal ErrorInfos through suspend jobs. Job API added to to support all this. fixes #23 --- .../c2kernel/scripting/ScriptErrorException.java | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/main/java/com/c2kernel/scripting/ScriptErrorException.java (limited to 'src/main/java/com/c2kernel/scripting/ScriptErrorException.java') diff --git a/src/main/java/com/c2kernel/scripting/ScriptErrorException.java b/src/main/java/com/c2kernel/scripting/ScriptErrorException.java new file mode 100644 index 0000000..9b1084f --- /dev/null +++ b/src/main/java/com/c2kernel/scripting/ScriptErrorException.java @@ -0,0 +1,30 @@ +package com.c2kernel.scripting; + +public class ScriptErrorException extends java.lang.Exception { + + /** + * Creates new sciptingEngineException without detail message. + */ + ErrorInfo errors; + public ScriptErrorException() { + } + + /** + * Constructs an sciptingEngineException with the specified detail message. + * @param msg the detail message. + */ + public ScriptErrorException(String msg) { + super(msg); + } + + public ScriptErrorException(ErrorInfo errors) { + super(errors.toString()); + this.errors = errors; + } + + public ErrorInfo getErrors() { + return errors; + } +} + + -- cgit v1.2.3