diff options
author | Adam Chlipala <adam@chlipala.net> | 2016-03-30 15:39:02 -0400 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2016-03-30 15:39:02 -0400 |
commit | 12783217508fd87c962a2d4871c6d3dbbcf58dee (patch) | |
tree | 3cb5a9a7f8b7764e32493d6d13efe886b02e398a /src/c | |
parent | 1a9520d6e00c63baca356d7e6aa2acc7424148bb (diff) |
At runtime, catch when we exceed 'limit inputs'
Diffstat (limited to 'src/c')
-rw-r--r-- | src/c/request.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/c/request.c b/src/c/request.c index d621aea7..cad84cb2 100644 --- a/src/c/request.c +++ b/src/c/request.c @@ -39,7 +39,12 @@ uw_context uw_request_new_context(int id, uw_app *app, uw_loggers *ls) { uw_logger log_error = ls->log_error; uw_context ctx = uw_init(id, ls); int retries_left = MAX_RETRIES; - uw_set_app(ctx, app); + + if (uw_set_app(ctx, app)) { + log_error(logger_data, "Unable to initialize request context. Most likely the limit on number of form inputs has been exceeded.\n"); + uw_free(ctx); + return NULL; + } while (1) { failure_kind fk = uw_begin_init(ctx); |