Adding JMCR-Stable version
[Benchmarks_CSolver.git] / JMCR-Stable / real-world application / jigsaw / src / org / w3c / jigsaw / http / HTTPException.java
diff --git a/JMCR-Stable/real-world application/jigsaw/src/org/w3c/jigsaw/http/HTTPException.java b/JMCR-Stable/real-world application/jigsaw/src/org/w3c/jigsaw/http/HTTPException.java
new file mode 100644 (file)
index 0000000..22d0ed2
--- /dev/null
@@ -0,0 +1,36 @@
+// HTTPException.java\r
+// $Id: HTTPException.java,v 1.1 2010/06/15 12:21:57 smhuang Exp $\r
+// (c) COPYRIGHT MIT and INRIA, 1996.\r
+// Please first read the full copyright statement in file COPYRIGHT.html\r
+\r
+package org.w3c.jigsaw.http ;\r
+\r
+import org.w3c.tools.resources.ProtocolException;\r
+import org.w3c.tools.resources.ReplyInterface;\r
+\r
+/**\r
+ * All entities should throw an HTTPException when encoutering some problems.\r
+ * This kind of exception is the one that gets normally caught by clients,\r
+ * and result in sending back HTTP error messages to the client.\r
+ */\r
+\r
+public class HTTPException extends ProtocolException {\r
+\r
+  public HTTPException (String msg) {\r
+    super (msg) ;\r
+  }\r
+\r
+  public HTTPException (String msg, Reply error) {\r
+    super (msg, error) ;\r
+  }\r
+\r
+  public HTTPException (Reply error) {\r
+    super (error) ;\r
+  }\r
+\r
+  public HTTPException(ProtocolException ex) {\r
+    super(ex.getMessage(), ex.getReply());\r
+  }\r
+}\r
+\r
+       \r