Revision 12201
Added by Aaron Marcuse-Kubitza about 11 years ago
trunk/lib/sh/util.sh | ||
---|---|---|
726 | 726 |
function ignore_err_msg() # usage: pattern=... ignore_err_msg cmd... |
727 | 727 |
{ |
728 | 728 |
echo_func; kw_params pattern; : "${pattern?}" |
729 |
stderr_matches "try" "$@" || rethrow # try: suppress error exit
|
|
729 |
stderr_matches "$@" || rethrow
|
|
730 | 730 |
} |
731 | 731 |
alias ignore_err_msg='"ignore_err_msg" ' # last space alias-expands next word |
732 | 732 |
|
trunk/lib/sh/db.sh | ||
---|---|---|
362 | 362 |
{ |
363 | 363 |
echo_func; : "${schema:?}"; mk_schema_esc |
364 | 364 |
pattern='cannot create temporary relation in non-temporary schema' \ |
365 |
stderr_matches try psql <<<"CREATE TEMP TABLE $schema_esc.t ()" |
|
366 |
# try: suppress error exit status |
|
365 |
stderr_matches psql <<<"CREATE TEMP TABLE $schema_esc.t ()" |
|
367 | 366 |
} |
368 | 367 |
|
369 | 368 |
pg_require_schema() # usage: schema=... pg_require_schema |
Also available in: Unified diff
*{.sh,run}: stderr_matches calls: don't need to wrap the command in `"try"` because stderr_matches now does this