roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r389581 - in /incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/sdk: MissingElementException.java UnexpectedRootElementException.java
Date Tue, 28 Mar 2006 19:08:55 GMT
Author: snoopdave
Date: Tue Mar 28 11:08:53 2006
New Revision: 389581

URL: http://svn.apache.org/viewcvs?rev=389581&view=rev
Log:
Patch from Jeff Battman to improve error and exception handling in AAAP

Added:
    incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/sdk/MissingElementException.java
    incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/sdk/UnexpectedRootElementException.java

Added: incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/sdk/MissingElementException.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/sdk/MissingElementException.java?rev=389581&view=auto
==============================================================================
--- incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/sdk/MissingElementException.java
(added)
+++ incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/sdk/MissingElementException.java
Tue Mar 28 11:08:53 2006
@@ -0,0 +1,15 @@
+package org.roller.presentation.atomadminapi.sdk;
+
+public class MissingElementException extends Exception {
+    private String parent;
+    private String child;
+    
+    public MissingElementException(String msg, String parent, String child) {
+        this.parent = parent;
+        this.child = child;
+    }
+    
+    public String getMessage() {
+        return super.getMessage() + ": expected element " + child + " as a child of element
" + parent;
+    }    
+}

Added: incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/sdk/UnexpectedRootElementException.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/sdk/UnexpectedRootElementException.java?rev=389581&view=auto
==============================================================================
--- incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/sdk/UnexpectedRootElementException.java
(added)
+++ incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/sdk/UnexpectedRootElementException.java
Tue Mar 28 11:08:53 2006
@@ -0,0 +1,15 @@
+package org.roller.presentation.atomadminapi.sdk;
+
+public class UnexpectedRootElementException extends Exception {
+    private String expected;
+    private String actual;
+    
+    public UnexpectedRootElementException(String msg, String expected, String actual) {
+        this.expected = expected;
+        this.actual = actual;
+    }
+    
+    public String getMessage() {
+        return super.getMessage() + ": expected root element:  " + expected + ", was: " +
actual;
+    }    
+}



Mime
View raw message