Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/MediaWiki/API.pm
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ An example for the on_error configuration could be something like:

Errors are stored in $mw->{error}->{code} with more information in $mw->{error}->{details}. $mw->{error}->{stacktrace} includes
the details and a stacktrace to locate where any problems originated from (in some code which uses this module for example).
The MediaWiki::API object itself is provided to the function.

The error codes are as follows

Expand Down Expand Up @@ -900,7 +901,7 @@ sub _error {
$self->{error}->{details} = $desc;
$self->{error}->{stacktrace} = Carp::longmess($desc);

$self->{config}->{on_error}->() if (defined $self->{config}->{on_error});
$self->{config}->{on_error}->($self) if (defined $self->{config}->{on_error});

return undef;
}
Expand Down