Browse Source

Prism exits with code 1 if failed due to existence of deadlocks.

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@4086 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 14 years ago
parent
commit
f749ab8f24
  1. 28
      prism/src/prism/PrismCL.java

28
prism/src/prism/PrismCL.java

@ -764,7 +764,7 @@ public class PrismCL
}
mainLog.print("\nTip: Use the -fixdl switch to automatically add self-loops in deadlock states.\n");
model.clear();
exit();
exit(1);
}
}
} else {
@ -776,7 +776,7 @@ public class PrismCL
mainLog.println();
mainLog.print("\nError: Model contains " + deadlocks.size() + " deadlock states");
mainLog.print("\nTip: Use the -fixdl switch to automatically add self-loops in deadlock states.\n");
exit();
exit(1);
}
}
}
@ -1957,8 +1957,9 @@ public class PrismCL
mainLog.println();
}
// report (non-fatal) error
/**
* Report a (non-fatal) error to the log.
*/
private void error(String s)
{
// If (and only if) we are in "test" (and not "testall") mode, treat any error as fatal
@ -1969,8 +1970,9 @@ public class PrismCL
mainLog.println("\nError: " + s + ".");
}
// report error and exit cleanly
/**
* Report a (fatal) error and exit cleanly (with exit code 1).
*/
private void errorAndExit(String s)
{
prism.closeDown(false);
@ -1978,14 +1980,24 @@ public class PrismCL
System.exit(1);
}
// exit cleanly (no error)
/**
* Exit cleanly (with exit code 0).
*/
private void exit()
{
prism.closeDown(true);
System.exit(0);
}
/**
* Exit cleanly (with exit code i).
*/
private void exit(int i)
{
prism.closeDown(true);
System.exit(i);
}
// main method
public static void main(String[] args)

Loading…
Cancel
Save