summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-11-04 06:43:12 +0000
committerfukachan <fukachan>2001-11-04 06:43:12 +0000
commit01081b02188f6bb8b140b29aac84c66ee08811d9 (patch)
treed91ce365692d70e4feafeb7bf4b69acbc33acd71
parente171a88db80e589d1753f7f88ed906105002dfcf (diff)
downloadfml8-01081b02188f6bb8b140b29aac84c66ee08811d9.tar.gz
fml8-01081b02188f6bb8b140b29aac84c66ee08811d9.tar.bz2
fml8-01081b02188f6bb8b140b29aac84c66ee08811d9.zip
eval FML::Process::Flow::ProcessStart($obj, $args);
and trap error. If error traped and $obj has help() method, run $obj->help(). also upcall the $@ by croak($@)
-rw-r--r--fml/lib/FML/Process/Switch.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/fml/lib/FML/Process/Switch.pm b/fml/lib/FML/Process/Switch.pm
index b37be72c..205e907b 100644
--- a/fml/lib/FML/Process/Switch.pm
+++ b/fml/lib/FML/Process/Switch.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Switch.pm,v 1.23 2001/11/03 12:23:16 fukachan Exp $
+# $FML: Switch.pm,v 1.24 2001/11/04 04:42:52 fukachan Exp $
#
package FML::Process::Switch;
@@ -165,7 +165,13 @@ sub main::Bootstrap2
my $obj = ProcessSwitch($args);
# start the process.
- FML::Process::Flow::ProcessStart($obj, $args);
+ eval q{
+ FML::Process::Flow::ProcessStart($obj, $args);
+ };
+ if ($@) {
+ if ($obj->can('help')) { eval $obj->help();};
+ croak($@);
+ }
}