~ubuntu-branches/ubuntu/trusty/tomcat7/trusty-security

« back to all changes in this revision

Viewing changes to java/org/apache/catalina/valves/ErrorReportValve.java

  • Committer: Package Import Robot
  • Author(s): tony mancill
  • Date: 2012-06-07 22:43:21 UTC
  • mfrom: (11.1.4 sid)
  • Revision ID: package-import@ubuntu.com-20120607224321-cfev8j681yueyov3
Tags: 7.0.27-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
 * @author <a href="mailto:nicolaken@supereva.it">Nicola Ken Barozzi</a> Aisa
44
44
 * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
45
45
 * @author Yoav Shapira
46
 
 * @version $Id: ErrorReportValve.java 1187022 2011-10-20 19:55:37Z markt $
 
46
 * @version $Id: ErrorReportValve.java 1297028 2012-03-05 12:24:13Z markt $
47
47
 */
48
48
 
49
49
public class ErrorReportValve extends ValveBase {
101
101
            return;
102
102
        }
103
103
 
104
 
        if (request.isAsyncStarted()) {
105
 
            return;
106
 
        }
107
 
 
108
104
        Throwable throwable =
109
 
            (Throwable) request.getAttribute(RequestDispatcher.ERROR_EXCEPTION);
 
105
                (Throwable) request.getAttribute(RequestDispatcher.ERROR_EXCEPTION);
 
106
 
 
107
        if (request.isAsyncStarted() && response.getStatus() < 400 &&
 
108
                throwable == null) {
 
109
            return;
 
110
        }
110
111
 
111
112
        if (throwable != null) {
112
113
 
133
134
            ExceptionUtils.handleThrowable(tt);
134
135
        }
135
136
 
 
137
        if (request.isAsyncStarted()) {
 
138
            request.getAsyncContext().complete();
 
139
        }
136
140
    }
137
141
 
138
142