예제 #1
0
 public static void error(Exception exception, String error, boolean fatal) {
   JOptionPane.showMessageDialog(
       null, error + "\n\nException text: " + exception, "Error", JOptionPane.ERROR_MESSAGE);
   if (exception != null) {
     exception.printStackTrace(RXR.log);
   }
   if (fatal) {
     java.lang.System.exit(0);
   }
 }
예제 #2
0
 /**
  * @param name The name of the state / node
  * @return Index of the state with the given name
  */
 private Integer getLatexId(String name) {
   // List <FAState> states = machine.getStateList();
   List<GElementFAState> states = getStates();
   int i = 0;
   for (GElementFAState a : states) {
     if (a.getLabel().equals(name)) return i;
     i++;
   }
   java.lang.System.err.print("Error getting transition node ID");
   java.lang.System.exit(1);
   return 0;
 }