Search in sources :

Example 1 with PrintWriterGetHeader

use of org.apache.derby.shared.common.stream.PrintWriterGetHeader in project derby by apache.

the class SingleStream method makeStream.

// 
// class interface
// 
/**
 *		Make the stream; note that service properties override
 *		application and system properties.
 */
private HeaderPrintWriter makeStream() {
    // get the header
    PrintWriterGetHeader header = makeHeader();
    HeaderPrintWriter hpw = makeHPW(header);
    // so use/create the default stream.
    if (hpw == null)
        hpw = createDefaultStream(header);
    return hpw;
}
Also used : HeaderPrintWriter(org.apache.derby.shared.common.stream.HeaderPrintWriter) PrintWriterGetHeader(org.apache.derby.shared.common.stream.PrintWriterGetHeader)

Example 2 with PrintWriterGetHeader

use of org.apache.derby.shared.common.stream.PrintWriterGetHeader in project derby by apache.

the class BaseMonitor method reportException.

protected void reportException(Throwable t) {
    PrintWriterGetHeader pwgh = null;
    if (systemStreams != null)
        pwgh = systemStreams.stream().getHeader();
    ErrorStringBuilder esb = new ErrorStringBuilder(pwgh);
    esb.appendln(t.getMessage());
    esb.stackTrace(t);
    report(esb.get().toString());
}
Also used : ErrorStringBuilder(org.apache.derby.shared.common.error.ErrorStringBuilder) PrintWriterGetHeader(org.apache.derby.shared.common.stream.PrintWriterGetHeader)

Aggregations

PrintWriterGetHeader (org.apache.derby.shared.common.stream.PrintWriterGetHeader)2 ErrorStringBuilder (org.apache.derby.shared.common.error.ErrorStringBuilder)1 HeaderPrintWriter (org.apache.derby.shared.common.stream.HeaderPrintWriter)1