Manual:$wgExceptionHooks/zh
From Linux Web Expert
File:OOjs UI icon alert-destructive.svg | <translate> This feature was removed completely in version <tvar name=ver>1.30.0</tvar>.</translate> |
<translate> Extensions</translate>: $wgExceptionHooks | |
---|---|
用于输出例外的挂钩。 |
|
<translate> Introduced in version:</translate> | 1.12.0 (r29444) |
<translate> Removed in version:</translate> | 1.30.0 (Gerrit change 355060; git #I85844a2) |
<translate> Allowed values:</translate> | (回调数组) |
<translate> Default value:</translate> | [] |
<translate> Other settings:</translate> <translate> Alphabetical</translate> | <translate> By function</translate> |
细节
用于输出例外的钩子。 格式为:
$wgExceptionHooks['MWException'][] = $funcname;
或:
$wgExceptionHooks['MWException'][] = array( $class, $funcname /*, extra args... */ );
钩子将例外对象作为第一个参数接收,并且应返回字符串或false。