зеркало из https://github.com/mozilla/pjs.git
Bug 337701: 012throwables.t doesn't recognize that certain errors are AUTH_ERROR codes
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=justdave
This commit is contained in:
Родитель
e983a5d96e
Коммит
f9dd8bcd3a
|
@ -113,9 +113,18 @@ foreach my $file (keys %test_modules) {
|
||||||
last if $line =~ /^__END__/; # skip the POD (at least in
|
last if $line =~ /^__END__/; # skip the POD (at least in
|
||||||
# Bugzilla/Error.pm)
|
# Bugzilla/Error.pm)
|
||||||
$lineno++;
|
$lineno++;
|
||||||
if ($line =~ /^[^#]*Throw(Code|User)Error\s*\(\s*["'](.*?)['"]/) {
|
if ($line =~
|
||||||
my $errtype = lc($1);
|
/^[^#]*(Throw(Code|User)Error|error\s+=>)\s*\(?\s*["'](.*?)['"]/) {
|
||||||
my $errtag = $2;
|
my $errtype;
|
||||||
|
# If it's a normal ThrowCode/UserError
|
||||||
|
if ($2) {
|
||||||
|
$errtype = lc($2);
|
||||||
|
}
|
||||||
|
# If it's an AUTH_ERROR tag
|
||||||
|
else {
|
||||||
|
$errtype = 'code';
|
||||||
|
}
|
||||||
|
my $errtag = $3;
|
||||||
push @{$Errors{$errtype}{$errtag}{used_in}{$file}}, $lineno;
|
push @{$Errors{$errtype}{$errtag}{used_in}{$file}}, $lineno;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче