View Javadoc

1   //  jGABL2 - The Java Graph Algorithm Base Library
2   //  Copyright (C) 2000-2006  Alexander Schwartz
3   //
4   //  This library is free software; you can redistribute it and/or
5   //  modify it under the terms of the GNU Lesser General Public
6   //  License as published by the Free Software Foundation; either
7   //  version 2.1 of the License, or (at your option) any later version.
8   //
9   //  This library is distributed in the hope that it will be useful,
10  //  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  //  Lesser General Public License for more details.
13  
14  package net.sf.jgabl2.core.util.check;
15  
16  
17  /**
18   * Indicates a violated invariant.
19   *
20   * @author Alexander Schwartz
21   * @since 0.1.0
22   */
23  public class InvariantViolatedException
24          extends RuntimeException {
25      /**
26       * Generated serial version id.
27       */
28      private static final long serialVersionUID = -6453237151346486960L;
29  
30      /**
31       * Creates a new instance with the specified message.
32       * @param msg the message of this exception instance
33       */
34      public InvariantViolatedException(final String msg) {
35          super("invariant violated: " + msg); //$NON-NLS-1$
36      }
37  }