Beispiel #1
0
 /**
  * Throws a runtime exception for an unimplemented method.
  *
  * @param ext optional extension
  * @return runtime exception (indicates that an error is raised)
  */
 public static RuntimeException notimplemented(final Object... ext) {
   final TokenBuilder tb = new TokenBuilder("Not Implemented");
   if (ext.length != 0) tb.addExt(" (%)", ext);
   throw new UnsupportedOperationException(tb.add('.').toString());
 }
Beispiel #2
0
 /**
  * Throws a runtime exception for an unexpected exception.
  *
  * @param ext optional extension
  * @return runtime exception (indicates that an error is raised)
  */
 public static RuntimeException notexpected(final Object... ext) {
   final TokenBuilder tb = new TokenBuilder();
   tb.addExt("%", ext.length == 0 ? "Not Expected." : ext[0]);
   throw new RuntimeException(tb.toString());
 }