Do not instantiate new maps in LeafRefContextBuilder
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / leafref / LeafRefDataValidationFailedException.java
1 /**
2  * Copyright (c) 2015 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.yangtools.yang.data.impl.leafref;
9
10 public class LeafRefDataValidationFailedException extends Exception {
11
12     private static final long serialVersionUID = 1L;
13     private int errorsCount = 1;
14
15     public LeafRefDataValidationFailedException(String message) {
16         super(message);
17     }
18
19     public LeafRefDataValidationFailedException(String message, int errorsCount) {
20         super(message);
21         this.errorsCount = errorsCount;
22     }
23
24     public LeafRefDataValidationFailedException(String message,
25             final Throwable cause) {
26         super(message, cause);
27     }
28
29     public int getValidationsErrorsCount() {
30         return errorsCount;
31     }
32 }