Bug 1003: Restconf - remove whitespace on input
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / java / org / opendaylight / controller / md / sal / dom / store / impl / tree / DataPreconditionFailedException.java
1 /*
2  * Copyright (c) 2014 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.controller.md.sal.dom.store.impl.tree;
9
10 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
11
12 import com.google.common.base.Preconditions;
13
14 public class DataPreconditionFailedException extends Exception {
15     private static final long serialVersionUID = 1L;
16     private final InstanceIdentifier path;
17
18     public DataPreconditionFailedException(final InstanceIdentifier path, final String message) {
19         super(message);
20         this.path = Preconditions.checkNotNull(path);
21     }
22
23     public DataPreconditionFailedException(final InstanceIdentifier path, final String message, final Throwable cause) {
24         super(message, cause);
25         this.path = Preconditions.checkNotNull(path);
26     }
27
28     public InstanceIdentifier getPath() {
29         return path;
30     }
31 }