Package com.dotcms.repackage.org.apache.bsf

Examples of com.dotcms.repackage.org.apache.bsf.BSFException


            // corrected the situation by aborting the loop and
            // a long stacktrace would end up on the user's console
            throw (Error) t;
        }
        else {
            throw new BSFException(BSFException.REASON_OTHER_ERROR,
                                   "JavaScript Error: " + message,
                                   target);
        }
    }
View Full Code Here


      public Object call(Object sourceCode, String method, Object[] args) throws BSFException {
        GroovyClassLoader gcl = new GroovyClassLoader();
        try {
        return ((GroovyObject)gcl.parseClass(sourceCode.toString()).newInstance()).invokeMethod(method, args);
        } catch (Exception e) {
              throw new BSFException(BSFException.REASON_EXECUTION_ERROR, "exception from Groovy: " + e, e);
          }
      }
View Full Code Here

            }else{
              return getEvalShell().evaluate(readFile(source),convertToValidJavaClassname(source.substring(source.indexOf('/'),source.length())));
            }
//            return getEvalShell().evaluate(script.toString(),convertToValidJavaClassname(source.substring(source.indexOf('/'),source.length())));
          } catch (Exception e) {
              throw new BSFException(BSFException.REASON_EXECUTION_ERROR, "exception from Groovy: " + e, e);
          }
      }
View Full Code Here

              // use evaluate to pass in the BSF variables
              //source = convertToValidJavaClassname(source);
            getEvalShell().evaluate(readFile(source),convertToValidJavaClassname(source.substring(source.indexOf('/'),source.length())));
//            getEvalShell().parse(script.toString(),convertToValidJavaClassname(source.substring(source.indexOf('/'),source.length())));
          } catch (Exception e) {
              throw new BSFException(BSFException.REASON_EXECUTION_ERROR, "exception from Groovy: " + e, e);
          }
      }
View Full Code Here

      }else{
        v = callFunctionOnPage(phpw.getPage(), method, env, values);
      }
    }catch (Exception e) {
      Logger.error(this, e.getMessage(),e );
      throw new BSFException("Unable to find function name " + method != null ? method : "" + " to call");
    }
    return v;
  }
View Full Code Here

    try
      page = php.parse(path);
     
    } catch (IOException e) {
      Logger.error(this, e.getMessage(), e);
      throw new BSFException(BSFException.REASON_IO_ERROR, e.getMessage(), e);
    }
    QuercusProgram qp = null;
    try {
      qp = php.parseCode(code);
    } catch (IOException e) {
      Logger.error(this, e.getMessage(), e);
      throw new BSFException(BSFException.REASON_IO_ERROR, e.getMessage(), e);
    }
   
    PHPEvalWrapper wrapper = new PHPEvalWrapper();
    StringWriter sw = new StringWriter();
    WriterStreamImpl writerImpl = new WriterStreamImpl();
View Full Code Here

    QuercusPage page = null;
    try
      page = php.parse(path);
    } catch (IOException e) {
      Logger.error(this, e.getMessage(), e);
      throw new BSFException(BSFException.REASON_IO_ERROR, e.getMessage(), e);
    }
    PHPEvalWrapper wrapper = new PHPEvalWrapper();
    StringWriter sw = new StringWriter();
    WriterStreamImpl writerImpl = new WriterStreamImpl();
        writerImpl.setWriter(sw);
View Full Code Here

    QuercusProgram qp = null;
    try {
      qp = php.parseCode(code);
    } catch (IOException e) {
      Logger.error(this, e.getMessage(), e);
      throw new BSFException(BSFException.REASON_IO_ERROR, e.getMessage(), e);
    }
   
    PHPEvalWrapper wrapper = new PHPEvalWrapper();
    StringWriter sw = new StringWriter();
    WriterStreamImpl writerImpl = new WriterStreamImpl();
View Full Code Here

TOP

Related Classes of com.dotcms.repackage.org.apache.bsf.BSFException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.