Package org.mvel2

Examples of org.mvel2.ErrorDetail


      return new CompileErrorImpl(fragment, line, e.getError(), reason);
    }

    public CompileError causedBy(CompileErrors reason, String cause) {
      return new CompileErrorImpl(fragment, line,
          new EvaluatorCompiler.CompileErrorDetail(cause, new ErrorDetail(fragment.toCharArray(), line, true, cause)), reason);
    }
View Full Code Here


    public EvaluatorCompiler.CompileErrorDetail getError() {
        //TODO is it enough to report just the first error?
        //ensure we wrap this in ${}
        return new EvaluatorCompiler.CompileErrorDetail(String.format("${%s}", expression),
            new ErrorDetail(expression.toCharArray(), 0, true, "error"));
    }
View Full Code Here

      return new AnalysisErrorImpl(fragment, line, e.getError(), reason);
    }

    public AnalysisError causedBy(CompileErrors reason, String cause) {
      return new AnalysisErrorImpl(fragment, line,
          new EvaluatorCompiler.CompileErrorDetail(cause, new ErrorDetail(fragment.toCharArray(), line, true, cause)), reason);
    }
View Full Code Here

      return new AnalysisErrorImpl(fragment, line, e.getError(), reason);
    }

    public AnalysisError causedBy(CompileErrors reason, String cause) {
      return new AnalysisErrorImpl(fragment, line,
          new EvaluatorCompiler.CompileErrorDetail(cause, new ErrorDetail(cause, true)), reason);
    }
View Full Code Here

      return new CompileErrorImpl(fragment, line, e.getError(), reason);
    }

    public CompileError causedBy(CompileErrors reason, String cause) {
      return new CompileErrorImpl(fragment, line,
          new EvaluatorCompiler.CompileErrorDetail(cause, new ErrorDetail(cause, true)), reason);
    }
View Full Code Here

    public EvaluatorCompiler.CompileErrorDetail getError() {
        //TODO is it enough to report just the first error?
        //ensure we wrap this in ${}
        return new EvaluatorCompiler.CompileErrorDetail(String.format("${%s}", expression),
            new ErrorDetail(expression, true));
    }
View Full Code Here

                                //parserContext.setStrictTypeEnforcement(true);
                                compiler.compile(parserContext);
                                List<ErrorDetail> mvelErrors = parserContext.getErrorList();
                                if (mvelErrors != null) {
                                    for (Iterator<ErrorDetail> iterator = mvelErrors.iterator(); iterator.hasNext(); ) {
                                        ErrorDetail error = iterator.next();
                                        errors.add(new ProcessValidationErrorImpl(process,
                                            "Action node '" + node.getName() + "' [" + node.getId() + "] has invalid action: " + error.getMessage() + "."));
                                    }
                                }
                            } catch (Throwable t) {
                                errors.add(new ProcessValidationErrorImpl(process,
                                    "Action node '" + node.getName() + "' [" + node.getId() + "] has invalid action: " + t.getMessage() + "."));
View Full Code Here

                                //parserContext.setStrictTypeEnforcement(true);
                                compiler.compile(parserContext);
                                List<ErrorDetail> mvelErrors = parserContext.getErrorList();
                                if (mvelErrors != null) {
                                    for (Iterator<ErrorDetail> iterator = mvelErrors.iterator(); iterator.hasNext(); ) {
                                        ErrorDetail error = iterator.next();
                                        errors.add(new ProcessValidationErrorImpl(process,
                                            "Action node '" + node.getName() + "' [" + node.getId() + "] has invalid action: " + error.getMessage() + "."));
                                    }
                                }
                            } catch (Throwable t) {
                                errors.add(new ProcessValidationErrorImpl(process,
                                    "Action node '" + node.getName() + "' [" + node.getId() + "] has invalid action: " + t.getMessage() + "."));
View Full Code Here

                                //parserContext.setStrictTypeEnforcement(true);
                                compiler.compile(parserContext);
                                List<ErrorDetail> mvelErrors = parserContext.getErrorList();
                                if (mvelErrors != null) {
                                    for (Iterator<ErrorDetail> iterator = mvelErrors.iterator(); iterator.hasNext(); ) {
                                        ErrorDetail error = iterator.next();
                                        errors.add(new ProcessValidationErrorImpl(process,
                                            "Action node '" + node.getName() + "' [" + node.getId() + "] has invalid action: " + error.getMessage() + "."));
                                    }
                                }
                            } catch (Throwable t) {
                                errors.add(new ProcessValidationErrorImpl(process,
                                    "Action node '" + node.getName() + "' [" + node.getId() + "] has invalid action: " + t.getMessage() + "."));
View Full Code Here

                                                          "Unable to build expression for action '" + actionDescr.getText() + "' :" + e ) );
        }
    }

    public static String processMacros(String consequence) {
        MacroProcessor macroProcessor = new MacroProcessor();
        macroProcessor.setMacros( macros );
        return macroProcessor.parse( delimitExpressions( consequence ) );
    }
View Full Code Here

TOP

Related Classes of org.mvel2.ErrorDetail

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.