use of edu.cmu.cs.hcii.cogtool.util.RcvrComputationException in project cogtool by cogtool.
the class SNIFACTCmd method computeInBackground.
public static SNIFACTExecContext computeInBackground(Project project, Design design, Interaction interaction, TaskGroup group, SNIFACTParameters parms) {
isComputing = true;
try {
SNIFACTAnalysisWorkThread workThread = new SNIFACTAnalysisWorkThread(SNIFACTPredictionAlgo.ONLY, project, design, null, interaction, group, parms);
if (SNIFACTPredictionAlgo.exportCTEModelFile != null) {
return null;
}
ITraceWindow traceWin = interaction.createTraceWindow("Computation trace", workThread, "Trace output: stdout (top) and stderr (bottom)");
workThread.setTraceWindow(traceWin);
ThreadManager.startNewThread(workThread);
return workThread.getExecContext();
} catch (IPredictionAlgo.ComputationException ex) {
throw new RcvrComputationException(ex);
} catch (IllegalStateException ex) {
throw new RcvrIllegalStateException(ex);
} catch (UnsupportedOperationException ex) {
throw new RcvrUnimplementedFnException(ex);
} catch (Exception ex) {
throw new RcvrComputationException(ex);
}
}
use of edu.cmu.cs.hcii.cogtool.util.RcvrComputationException in project cogtool by cogtool.
the class ComputePredictionCmd method computeInBackground.
/**
* Perform the analysis in the background. Set the result when done.
*/
public static APredictionResult computeInBackground(IPredictionAlgo computeAlg, Script s, Interaction interact) {
try {
DefaultAnalysisWorkThread workThread = new DefaultAnalysisWorkThread(computeAlg, s, null, interact);
ITraceWindow traceWin = interact.createTraceWindow("Computation trace", workThread, "Trace output: stdout (top) and stderr (bottom)");
workThread.setTraceWindow(traceWin);
ThreadManager.startNewThread(workThread);
return workThread.getResultProxy();
} catch (IPredictionAlgo.ComputationException ex) {
throw new RcvrComputationException(ex);
} catch (IllegalStateException ex) {
throw new RcvrIllegalStateException(ex);
} catch (UnsupportedOperationException ex) {
throw new RcvrUnimplementedFnException(ex);
} catch (Exception ex) {
throw new RcvrComputationException(ex);
}
}
Aggregations