Browse Source

PrismCL: Catch CuddOutOfMemoryException and print helpful message

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10481 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Joachim Klein 11 years ago
parent
commit
9ed1674013
  1. 22
      prism/src/prism/PrismCL.java

22
prism/src/prism/PrismCL.java

@ -196,8 +196,26 @@ public class PrismCL implements PrismModelListener
private String[] paramUpperBounds = null;
private String[] paramNames = null;
// entry point - run method
/**
* Entry point: call run method, catch CuddOutOfMemoryException
*/
public void go(String[] args) {
try {
run(args);
} catch (jdd.JDD.CuddOutOfMemoryException e) {
mainLog.println("\nError: " + e.getMessage());
mainLog.println(" Try to restart PRISM and increase the memory available to CuDD using the -cuddmaxmem argument.\n");
mainLog.println(" Stack trace for the failed method:");
for (StackTraceElement st : e.getStackTrace()) {
mainLog.print(" ");
mainLog.println(st);
}
System.exit(1);
}
}
// entry point - run method
public void run(String[] args)
{
int i, j, k;
@ -2335,7 +2353,7 @@ public class PrismCL implements PrismModelListener
public static void main(String[] args)
{
new PrismCL().run(args);
new PrismCL().go(args);
}
}

Loading…
Cancel
Save