Move NetconfMessage into netconf.api.messages
[netconf.git] / protocol / netconf-api / src / main / java / org / opendaylight / netconf / api / xml / UnexpectedNamespaceException.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.netconf.api.xml;
9
10 import java.io.Serial;
11 import java.util.Map;
12 import org.opendaylight.netconf.api.DocumentedException;
13 import org.opendaylight.yangtools.yang.common.ErrorSeverity;
14 import org.opendaylight.yangtools.yang.common.ErrorTag;
15 import org.opendaylight.yangtools.yang.common.ErrorType;
16
17 public class UnexpectedNamespaceException extends DocumentedException {
18     @Serial
19     private static final long serialVersionUID = 1L;
20
21     public UnexpectedNamespaceException(final String format, final Object... args) {
22         this(String.format(format, args), ErrorType.APPLICATION, ErrorTag.OPERATION_FAILED, ErrorSeverity.ERROR);
23     }
24
25     public UnexpectedNamespaceException(final String message, final ErrorType errorType, final ErrorTag errorTag,
26             final ErrorSeverity errorSeverity) {
27         this(message, errorType, errorTag, errorSeverity, Map.of());
28     }
29
30     public UnexpectedNamespaceException(final String message, final ErrorType errorType, final ErrorTag errorTag,
31             final ErrorSeverity errorSeverity, final Map<String, String> errorInfo) {
32         super(message, errorType, errorTag, errorSeverity, errorInfo);
33     }
34 }