Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Sympa
Commits
25102652
Commit
25102652
authored
Nov 28, 2019
by
IKEDA Soji
Browse files
Scenario: Won't die when a scenario failed compiling.
parent
c436b4ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/Sympa/Scenario.pm
View file @
25102652
...
...
@@ -242,15 +242,13 @@ sub compile {
my
$parsed
=
_parse_scenario
(
$data
,
$file_path
);
if
(
$parsed
and
not
(
$function
and
$function
eq
'
include
'))
{
my
$
compiled
=
_compile_scenario
(
$that
,
$function
,
$parsed
);
if
(
$compiled
)
{
my
$
sub
=
eval
$compiled
;
$parsed
->
{
compiled
}
=
_compile_scenario
(
$that
,
$function
,
$parsed
);
if
(
$
parsed
->
{
compiled
}
)
{
$parsed
->
{
sub
}
=
eval
$
parsed
->
{
compiled
}
;
# Bad syntax in compiled Perl code.
die
sprintf
"
%s: %s
\n
",
(
$file_path
||
'
(data)
'),
$EVAL_ERROR
unless
$sub
;
$parsed
->
{
compiled
}
=
$compiled
;
$parsed
->
{
sub
}
=
$sub
;
$log
->
syslog
('
err
',
'
%s: %s\n
',
(
$file_path
||
'
(data)
'),
$EVAL_ERROR
)
unless
ref
$parsed
->
{
sub
}
eq
'
CODE
';
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment