Examples of logMessage()


Examples of org.openquark.cal.compiler.CompilerMessageLogger.logMessage()

                if (generateLogger.getNErrors() > 0) {
                    //if an error occurred previously, we continue to compile the program to try to report additional
                    //meaningful compilation errors. However, this can produce spurious exceptions related to the fact
                    //that the program state does not satisfy preconditions because of the initial error(s). We don't
                    //report the spurious exception as an internal coding error.
                    generateLogger.logMessage(new CompilerMessage(new MessageKind.Fatal.UnableToRecoverFromCodeGenErrors(module.getName())));
                } else {                              
                    generateLogger.logMessage(new CompilerMessage(new MessageKind.Fatal.CodeGenerationAbortedDueToInternalCodingError(module.getName()), e));
                }                                                                           
            } catch (CompilerMessage.AbortCompilation ace) {
                /* Ignore exceptions generated by the act of logging. */
 
View Full Code Here

Examples of org.openquark.cal.compiler.CompilerMessageLogger.logMessage()

                    //meaningful compilation errors. However, this can produce spurious exceptions related to the fact
                    //that the program state does not satisfy preconditions because of the initial error(s). We don't
                    //report the spurious exception as an internal coding error.
                    generateLogger.logMessage(new CompilerMessage(new MessageKind.Fatal.UnableToRecoverFromCodeGenErrors(module.getName())));
                } else {                              
                    generateLogger.logMessage(new CompilerMessage(new MessageKind.Fatal.CodeGenerationAbortedDueToInternalCodingError(module.getName()), e));
                }                                                                           
            } catch (CompilerMessage.AbortCompilation ace) {
                /* Ignore exceptions generated by the act of logging. */
            }
        } catch (Error e) {
View Full Code Here

Examples of org.openquark.cal.compiler.CompilerMessageLogger.logMessage()

            } catch (CompilerMessage.AbortCompilation ace) {
                /* Ignore exceptions generated by the act of logging. */
            }
        } catch (Error e) {
            try {
                generateLogger.logMessage(new CompilerMessage(new MessageKind.Error.CodeGenerationAbortedWithException(module.getName(), e)));
            } catch (CompilerMessage.AbortCompilation ace) {
                /* Ignore exceptions generated by the act of logging. */
            }
        } finally {
            if (logger != null) {
View Full Code Here

Examples of org.openquark.cal.compiler.CompilerMessageLogger.logMessage()

        // Init and compile the workspace.
        Status initStatus = new Status("Init status.");
        workspaceManager.initWorkspace(getStreamProvider(), false, initStatus);

        if (initStatus.getSeverity() != Status.Severity.OK) {
            ml.logMessage(initStatus.asCompilerMessage());
        }

        long startCompile = System.currentTimeMillis();

        // If there are no errors go ahead and compile the workspace.
View Full Code Here

Examples of org.openquark.cal.compiler.CompilerMessageLogger.logMessage()

                if (generateLogger.getNErrors() > 0) {
                    //if an error occurred previously, we continue to compile the program to try to report additional
                    //meaningful compilation errors. However, this can produce spurious exceptions related to the fact
                    //that the program state does not satisfy preconditions because of the initial error(s). We don't
                    //report the spurious exception as an internal coding error.
                    generateLogger.logMessage(new CompilerMessage(new MessageKind.Fatal.UnableToRecoverFromCodeGenErrors(module.getName())));
                } else {
                    generateLogger.logMessage(new CompilerMessage(new MessageKind.Fatal.CodeGenerationAbortedDueToInternalCodingError(module.getName()), e));
                }
            } catch (CompilerMessage.AbortCompilation ace) {/* Ignore and continue. */}
        } catch (Error e) {
View Full Code Here

Examples of org.openquark.cal.compiler.CompilerMessageLogger.logMessage()

                    //meaningful compilation errors. However, this can produce spurious exceptions related to the fact
                    //that the program state does not satisfy preconditions because of the initial error(s). We don't
                    //report the spurious exception as an internal coding error.
                    generateLogger.logMessage(new CompilerMessage(new MessageKind.Fatal.UnableToRecoverFromCodeGenErrors(module.getName())));
                } else {
                    generateLogger.logMessage(new CompilerMessage(new MessageKind.Fatal.CodeGenerationAbortedDueToInternalCodingError(module.getName()), e));
                }
            } catch (CompilerMessage.AbortCompilation ace) {/* Ignore and continue. */}
        } catch (Error e) {
            try {
                generateLogger.logMessage(new CompilerMessage(new MessageKind.Error.CodeGenerationAbortedWithException(module.getName(), e), null));
View Full Code Here

Examples of org.openquark.cal.compiler.CompilerMessageLogger.logMessage()

                    generateLogger.logMessage(new CompilerMessage(new MessageKind.Fatal.CodeGenerationAbortedDueToInternalCodingError(module.getName()), e));
                }
            } catch (CompilerMessage.AbortCompilation ace) {/* Ignore and continue. */}
        } catch (Error e) {
            try {
                generateLogger.logMessage(new CompilerMessage(new MessageKind.Error.CodeGenerationAbortedWithException(module.getName(), e), null));
            } catch (CompilerMessage.AbortCompilation ace) {/* Ignore and continue. */}
        } finally {
            if (logger != null) {
                // Log messages to the passed-in logger.
                try {
View Full Code Here

Examples of org.openquark.cal.compiler.CompilerMessageLogger.logMessage()

                try {
                    javaGenerator = new LECCJavaBytecodeGenerator(module, resourceRepository, isForAdjunct(), forImmediateUse, classFileWriter);

                } catch (IOException e) {
                    generateLogger.logMessage(new CompilerMessage(new MessageKind.Error.CodeGenerationAbortedWithException(moduleName, e)));
                    return CompilerMessage.Severity.ERROR;
                }


            } else {
View Full Code Here

Examples of org.openquark.cal.compiler.CompilerMessageLogger.logMessage()

                try {
                    javaGenerator = new LECCJavaSourceGenerator(module, resourceRepository, dependeeModuleNameSet);

                } catch (IOException e) {
                    generateLogger.logMessage(new CompilerMessage(new MessageKind.Error.CodeGenerationAbortedWithException(moduleName, e)));
                    return CompilerMessage.Severity.ERROR;
                }
            }

            // Pass the status listeners to the java generator.
View Full Code Here

Examples of org.openquark.cal.compiler.CompilerMessageLogger.logMessage()

                            // Note: The code generation could potentially have failed because a foreign type or a foreign function's corresponding Java entity
                            // could not be resolved. (In this case the CodeGenerationException would be wrapping an UnableToResolveForeignEntityException)

                            final Throwable cause = e.getCause();
                            if (cause instanceof UnableToResolveForeignEntityException) {
                                generateLogger.logMessage(((UnableToResolveForeignEntityException)cause).getCompilerMessage());
                            }

                            generateLogger.logMessage(new CompilerMessage(new MessageKind.Error.CodeGenerationAborted(label.getQualifiedName().getQualifiedName()), e));

                        } catch (CompilerMessage.AbortCompilation e2) {/* Ignore and continue. */}
 
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.