001package org.jszip.rhino; 002 003/** 004 * @author stephenc 005 * @since 29/11/2012 14:58 006 */ 007public class JavaScriptTerminationException extends RuntimeException { 008 009 private final int exitCode; 010 011 public JavaScriptTerminationException() { 012 this(0); 013 } 014 015 public JavaScriptTerminationException(Throwable cause) { 016 this(0, cause); 017 } 018 019 public JavaScriptTerminationException(String message) { 020 this(message, 0); 021 } 022 023 public JavaScriptTerminationException(String message, Throwable cause) { 024 this(message, 0, cause); 025 } 026 027 public JavaScriptTerminationException(int exitCode) { 028 this.exitCode = exitCode; 029 } 030 031 public JavaScriptTerminationException(int exitCode, Throwable cause) { 032 super(cause); 033 this.exitCode = exitCode; 034 } 035 036 public JavaScriptTerminationException(String message, int exitCode) { 037 super(message); 038 this.exitCode = exitCode; 039 } 040 041 public JavaScriptTerminationException(String message, int exitCode, Throwable cause) { 042 super(message, cause); 043 this.exitCode = exitCode; 044 } 045 046 public int getExitCode() { 047 return exitCode; 048 } 049}