class ScriptModel {
    private String crawlJobUrl;
    private Collection<Map<String, String>> availableScriptEngines;
    private ScriptingConsole scriptingConsole;

	public ScriptModel(ScriptingConsole cc,
	        String crawlJobUrl,
			Collection<Map<String, String>> scriptEngines) {
	    scriptingConsole = cc;
	    this.crawlJobUrl = crawlJobUrl;
	    this.availableScriptEngines = scriptEngines;
    }
	
    public boolean isFailure() {
        return scriptingConsole.getException() != null;
    }
    public String getStackTrace() {<FILL_FUNCTION_BODY>}
    public Throwable getException() {
        return scriptingConsole.getException();
    }
    public int getLinesExecuted() {
        return scriptingConsole.getLinesExecuted();
    }
    public String getRawOutput() {
        return scriptingConsole.getRawOutput();
    }
    public String getHtmlOutput() {
        return scriptingConsole.getHtmlOutput();
    }
    public String getScript() {
        return scriptingConsole.getScript();
    }
    
    public String getCrawlJobShortName() {
        return scriptingConsole.getCrawlJob().getShortName();
    }
    public Collection<Map<String, String>> getAvailableScriptEngines() {
        return availableScriptEngines;
    }
    public List<Map<String, String>> getAvailableGlobalVariables() {
        return scriptingConsole.getAvailableGlobalVariables();
    }
    public String getCrawlJobUrl() {
        return crawlJobUrl;
    }
}

        Throwable exception = scriptingConsole.getException();
        if (exception == null) return "";
        StringWriter s = new StringWriter();
        exception.printStackTrace(new PrintWriter(s));
        return s.toString();
    
<no_super_class>