Examples of CompilationException


Examples of org.apache.xindice.core.query.CompilationException

                xu.setNamespaceMap(nsMap);
            } catch (Exception e) {
                if (e instanceof QueryException) {
                    throw (QueryException) e.fillInStackTrace();
                }
                throw new CompilationException("Error Compiling XUpdate Query", e);
            }
        }
View Full Code Here

Examples of org.drools.semantics.java.CompilationException

            } catch (SAXParseException e) {
                Exception ex = e.getException();
                if (ex instanceof FactoryException) {
                    Throwable t = ex.getCause();
                    if (t instanceof CompilationException) {
                        CompilationException exc = (CompilationException) t;
                        createMarker(res, exc.getErrorMessage(), reader.getLocator().getLineNumber(), reader.getLocator().getColumnNumber());
                    } else if (t instanceof NoViableAltException) {
                        NoViableAltException exc = (NoViableAltException) t;
                        createMarker(res, exc.getMessage(), reader.getLocator().getLineNumber(), reader.getLocator().getColumnNumber());
                    } else if (t == null) {
                        createMarker(res, ex.getMessage(), reader.getLocator().getLineNumber(), reader.getLocator().getColumnNumber());
                    } else {
                        createMarker(res, t.getMessage(), reader.getLocator().getLineNumber(), reader.getLocator().getColumnNumber());
                    }
View Full Code Here

Examples of play.exceptions.CompilationException

*
*/
public class PlayExceptionUtils {
  public static Exception mapJapidJavaCodeError(Exception ex) {
    if (ex instanceof CompilationException) {
      CompilationException e = (CompilationException) ex;
      if (!e.isSourceAvailable())
        return e;

      // now map java error to japidview source code

      String srcFilePath = e.getSourceFile();
      if (!srcFilePath.startsWith("/app/japidviews/")) {
        return e;
      }
      else if (!srcFilePath.endsWith("java")) {
        return e;
      }

      String viewSourceFilePath = DirUtil.mapJavaToSrc(srcFilePath);
      // File file = new File(viewSourceFilePath);
      VirtualFile vf = VirtualFile.fromRelativePath(viewSourceFilePath);

      int oriLineNumber = mapJavaErrorLineToSrcLine(e.getSourceVirtualFile().contentAsString(), e.getLineNumber());
      e = new CompilationException(vf, "\"" + e.getMessage() + "\"", oriLineNumber, 0, 0);
      return e;
    }
    return ex;
  }
View Full Code Here

Examples of play.exceptions.CompilationException

      if (tempName.startsWith(defaultTemplateRoot)) {
      } else {
        tempName = defaultTemplateRoot + File.separator + tempName;
      }
      VirtualFile vf = VirtualFile.fromRelativePath(tempName);
      CompilationException ce = new CompilationException(vf, "\"" + e.getMessage() + "\"", e.getLineNumber(), 0,
          0);
      throw ce;
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
View Full Code Here

Examples of play.exceptions.CompilationException

      jpt.name = e.getTemplateName();
      jpt.source = e.getTemplateSrc();
      // throw new TemplateExecutionException(jpt, e.getLineNumber(),
      // e.getMessage(), e);
      VirtualFile vf = VirtualFile.fromRelativePath("/app/" + e.getTemplateName());
      throw new CompilationException(vf, "\"" + e.getMessage() + "\"", e.getLineNumber(), 0, 0);
    } catch (RuntimeException e) {
      // TODO Auto-generated catch block
      // e.printStackTrace();
      throw e;
    }
View Full Code Here

Examples of yalp.exceptions.CompilationException

                        String message = problem.getMessage();
                        if (problem.getID() == IProblem.CannotImportPackage) {
                            // Non sense !
                            message = problem.getArguments()[0] + " cannot be resolved";
                        }
                        throw new CompilationException(Yalp.classes.getApplicationClass(className).javaFile, message, problem.getSourceLineNumber(), problem.getSourceStart(), problem.getSourceEnd());
                    }
                }
                // Something has been compiled
                ClassFile[] clazzFiles = result.getClassFiles();
                for (int i = 0; i < clazzFiles.length; i++) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.