[dw-free] clean up error logs
[commit: http://hg.dwscoalition.org/dw-free/rev/3d549c5277dc]
http://bugs.dwscoalition.org/show_bug.cgi?id=2812
Short-circuit if we cannot initialize the spellcheck.
Patch by
kareila.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=2812
Short-circuit if we cannot initialize the spellcheck.
Patch by
Files modified:
- cgi-bin/LJ/SpellCheck.pm
--------------------------------------------------------------------------------
diff -r 4713fd9d4898 -r 3d549c5277dc cgi-bin/LJ/SpellCheck.pm
--- a/cgi-bin/LJ/SpellCheck.pm Tue Oct 05 12:12:19 2010 +0800
+++ b/cgi-bin/LJ/SpellCheck.pm Tue Oct 05 18:54:49 2010 +0800
@@ -63,6 +63,10 @@ sub check_html {
my $r = DW::Request->get;
my ( $iwrite, $iread ) = $r->spawn( $self->{command}, $self->{command_args} );
+
+ # bail out here if we can't spawn the process
+ return "<?errorbar Could not initialize spell checker. Please open a support request if you see this message more than once. errorbar?>"
+ unless $iwrite && $iread;
my $read_data = sub {
my ( $fh ) = @_;
--------------------------------------------------------------------------------
