All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.redhat.ceylon.compiler.java.codegen.ErroneousException Maven / Gradle / Ivy

There is a newer version: 1.3.3
Show newest version
package com.redhat.ceylon.compiler.java.codegen;

import com.redhat.ceylon.compiler.typechecker.tree.Node;
import com.redhat.ceylon.langtools.tools.javac.tree.JCTree.JCExpression;

public class ErroneousException extends Exception {

    private final Node node;

    public ErroneousException(Node node, String message, Throwable cause) {
        super(message, cause);
        this.node = node;
    }
    
    public ErroneousException(Node node, String message) {
        this(node, message, null);
    }
    
    public JCExpression makeErroneous(AbstractTransformer gen) {
        return gen.makeErroneous(node, getMessage());
    }
    
    public void logError(AbstractTransformer gen) {
        gen.log.error(gen.position(node), "ceylon", getMessage());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy