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

com.sourcegraph.semanticdb_javac.SemanticdbReporter Maven / Gradle / Ivy

There is a newer version: 0.10.3
Show newest version
package com.sourcegraph.semanticdb_javac;

import java.io.PrintStream;

/**
 * Utilities to report error messages.
 *
 * 

NOTE(olafur): this class exists because I couldn't find compiler APIs to report diagnostics. * This class can be removed if the Java compiler has APIs to report info/warning/error messages. */ public class SemanticdbReporter { private final PrintStream out; public SemanticdbReporter() { this.out = System.err; } public void exception(Throwable e) { e.printStackTrace(out); out.println( "Please report a bug to https://github.com/sourcegraph/semanticdb-java with the stack trace above."); } public void error(String message) { // NOTE(olafur): ideally, this message should be reported as a compiler diagnostic, but I dind't // find // the reporter API so the message goes to stderr instead for now. out.printf("semanticdb-javac: %s\n", message); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy