Adjust to yangtools-2.0.0/odlparent-3.0.0 changes
[netconf.git] / restconf / restconf-nb-bierman02 / src / main / java / org / opendaylight / netconf / sal / restconf / impl / QueryParametersParser.java
index 783700bcba5f47bd6ba534a6843dae4e1a30f837..7e878591a1fa791fe821f9864d43c0df4eb70188 100644 (file)
@@ -13,7 +13,7 @@ import org.opendaylight.restconf.common.context.WriterParameters;
 import org.opendaylight.restconf.common.errors.RestconfDocumentedException;
 import org.opendaylight.restconf.common.errors.RestconfError;
 
-public class QueryParametersParser {
+public final class QueryParametersParser {
 
     private enum UriParameters {
         PRETTY_PRINT("prettyPrint"),
@@ -31,6 +31,10 @@ public class QueryParametersParser {
         }
     }
 
+    private QueryParametersParser() {
+
+    }
+
     public static WriterParameters parseWriterParameters(final UriInfo info) {
         return parseParams(info, false);
     }
@@ -58,7 +62,7 @@ public class QueryParametersParser {
                 }
                 wpBuilder.setDepth(depth);
             } catch (final NumberFormatException e) {
-                throw new RestconfDocumentedException(new RestconfError(
+                throw new RestconfDocumentedException(e, new RestconfError(
                         RestconfError.ErrorType.PROTOCOL, RestconfError.ErrorTag.INVALID_VALUE,
                         "Invalid depth parameter: " + e.getMessage(), null,
                         "The depth parameter must be an integer > 1 or \"unbounded\""));