@Override public void startError(String errorName) throws IOException { startMetadataIfNecessary(); wrapped.startError(errorName); }
writer.endUpdate(); writer.startError(""); writer.endError();
@Override public void startError(String errorName) throws IOException { wrapped.startError(errorName); }
@Override public void startError(String errorName) throws IOException { wrappedPartialResponseWriter.startError(errorName); }
@Override public void startError(String errorName) throws IOException { wrappedPartialResponseWriter.startError(errorName); }
@Override public void startError(String errorName) throws IOException { wrapped.startError(errorName); }
@Override public void startError(String errorName) throws IOException { wrapped.startError(errorName); }
@Override public void startError(String errorName) throws IOException { wrapped.startError(errorName); }
@Override public void startError(String errorName) throws IOException { wrappedPartialResponseWriter.startError(errorName); }
@Override public void startError(String errorName) throws IOException { startMetadataIfNecessary(); wrapped.startError(errorName); }
private void renderAjaxError(PartialResponseWriter partialWriter, Throwable ex) throws IOException { partialWriter.startError(ex.getClass().getName()); if (ex.getCause() != null) { partialWriter.write(ex.getCause().toString()); } else if (ex.getMessage() != null) { partialWriter.write(ex.getMessage()); } partialWriter.endError(); }
private void renderAjaxError(PartialResponseWriter partialWriter, Throwable ex) throws IOException { partialWriter.startError(ex.getClass().getName()); if (ex.getCause() != null) { partialWriter.write(ex.getCause().toString()); } else if (ex.getMessage() != null) { partialWriter.write(ex.getMessage()); } partialWriter.endError(); }
writer.startError(t.getClass().toString()); String msg; if (context.isProjectStage(ProjectStage.Production)) {
writer.startError(t.getClass().toString()); String msg; if (context.isProjectStage(ProjectStage.Production)) {
writer.startError(t.getClass().toString()); String msg; if (context.isProjectStage(ProjectStage.Production)) {
writer.startError(t.getClass().toString()); String msg; if (context.isProjectStage(ProjectStage.Production)) {
/** * Reset the partial response writer. It checks if we're still updating, which may occur when Mojarra is used * and an exception was thrown during rendering the partial response, and then gently closes the partial * response which Mojarra has left open. This would clear the internal state of the wrapped partial response * writer and thus make it ready for reuse without risking malformed XML. */ public void reset() { try { wrapped.flush(); // Note: this doesn't actually flush to writer, but clears internal state. if (updating) { // If reset() method is entered with updating=true, then it means that Mojarra is used and that // an exception was been thrown during ajax render response. The following calls will gently close // the partial response which Mojarra has left open. // MyFaces never enters reset() method with updating=true, this is handled in endDocument() method. updating = false; wrapped.startError(""); wrapped.endError(); wrapped.endElement("partial-response"); // Don't use endDocument() as it will flush. } } catch (IOException e) { throw new FacesException(e); } finally { responseReset(); } }
/** * Reset the partial response writer. It checks if we're still updating, which may occur when Mojarra is used * and an exception was thrown during rendering the partial response, and then gently closes the partial * response which Mojarra has left open. This would clear the internal state of the wrapped partial response * writer and thus make it ready for reuse without risking malformed XML. */ public void reset() { try { wrapped.flush(); // Note: this doesn't actually flush to writer, but clears internal state. if (updating) { // If reset() method is entered with updating=true, then it means that Mojarra is used and that // an exception was been thrown during ajax render response. The following calls will gently close // the partial response which Mojarra has left open. // MyFaces never enters reset() method with updating=true, this is handled in endDocument() method. updating = false; wrapped.startError(""); wrapped.endError(); wrapped.endElement("partial-response"); // Don't use endDocument() as it will flush. } } catch (IOException e) { throw new FacesException(e); } finally { responseReset(); } }
writer.startError("Invalid request"); for (ValidatorError error : errors) { writer.write(" Type:" + error.getType());
writer.endUpdate(); writer.startError(""); writer.endError();