line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catalyst::Plugin::ErrorCatcher::Plugin::CleanUp::Pg::MissingColumn; |
2
|
|
|
|
|
|
|
$Catalyst::Plugin::ErrorCatcher::Plugin::CleanUp::Pg::MissingColumn::VERSION = '0.0.8.18'; |
3
|
|
|
|
|
|
|
{ |
4
|
|
|
|
|
|
|
$Catalyst::Plugin::ErrorCatcher::Plugin::CleanUp::Pg::MissingColumn::DIST = 'Catalyst-Plugin-ErrorCatcher'; |
5
|
|
|
|
|
|
|
} |
6
|
9
|
|
|
9
|
|
9018
|
use strict; |
|
9
|
|
|
|
|
24
|
|
|
9
|
|
|
|
|
426
|
|
7
|
9
|
|
|
9
|
|
60
|
use warnings; |
|
9
|
|
|
|
|
19
|
|
|
9
|
|
|
|
|
1241
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub tidy_message { |
10
|
28
|
|
|
28
|
1
|
127
|
my $plugin = shift; |
11
|
28
|
|
|
|
|
51
|
my $errstr_ref = shift; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# column XXX does not exist |
14
|
28
|
|
|
|
|
45
|
${$errstr_ref} =~ s{ |
|
28
|
|
|
|
|
93
|
|
15
|
|
|
|
|
|
|
\A |
16
|
|
|
|
|
|
|
.+? |
17
|
|
|
|
|
|
|
DBI \s Exception: |
18
|
|
|
|
|
|
|
.+? |
19
|
|
|
|
|
|
|
ERROR:\s+ |
20
|
|
|
|
|
|
|
(column \s+ \S+ \s+ does \s+ not \s+ exist) |
21
|
|
|
|
|
|
|
\s+ |
22
|
|
|
|
|
|
|
.+ |
23
|
|
|
|
|
|
|
$ |
24
|
|
|
|
|
|
|
}{$1}xmsg; |
25
|
|
|
|
|
|
|
|
26
|
28
|
|
|
|
|
75
|
$errstr_ref; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
# ABSTRACT: cleanup column XXX does not exist messages from Pg |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=pod |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=encoding UTF-8 |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 NAME |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Catalyst::Plugin::ErrorCatcher::Plugin::CleanUp::Pg::MissingColumn - cleanup column XXX does not exist messages from Pg |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 VERSION |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
version 0.0.8.18 |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head2 tidy_message($self, $stringref) |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Tidy up Postgres messages where the error is related to a I<DBI exception>. |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 AUTHOR |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Chisel <chisel@chizography.net> |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
This software is copyright (c) 2015 by Chisel Wright. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
59
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=cut |