Mercurial > urweb
diff src/c/urweb.c @ 1295:929981850d9d
'tryDml' works with Postgres
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Tue, 07 Sep 2010 09:06:13 -0400 |
parents | b4480a56cab7 |
children | 714e8b84221b |
line wrap: on
line diff
--- a/src/c/urweb.c Tue Sep 07 08:28:07 2010 -0400 +++ b/src/c/urweb.c Tue Sep 07 09:06:13 2010 -0400 @@ -2175,6 +2175,15 @@ return s; } +uw_Basis_string uw_dup_and_clear_error_message(uw_context ctx) { + if (ctx->error_message[0]) { + char *s = uw_strdup(ctx, ctx->error_message); + ctx->error_message[0] = 0; + return s; + } else + return NULL; +} + uw_Basis_string uw_maybe_strdup(uw_context ctx, uw_Basis_string s1) { if (s1) return uw_strdup(ctx, s1);