Skip to content

Commit d4580a7

Browse files
committed
Merge branch 'streamline_error_messages'
2 parents 677320a + 6ec522a commit d4580a7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/WeBWorK/ContentGenerator/Problem.pm

+4-3
Original file line numberDiff line numberDiff line change
@@ -726,9 +726,10 @@ sub pre_header_initialize {
726726
# because the PG file is never run
727727
#
728728
if (defined ($pg->{pgcore}) ) {
729-
$self->addmessage(join(CGI::br(),@{$pg->{flags}->{DEBUG_messages}} ) ) if @{$pg->{flags}->{DEBUG_messages}};
730-
$self->{pgdebug} = $pg->{pgcore}->{flags}->{DEBUG_messages};
731-
$self->{pgwarning} = $pg->{pgcore}->{flags}->{WARNING_messages};
729+
my @debug_msgs = @{ $pg->{pgcore}->get_debug_messages};
730+
$self->addmessage(join(CGI::br(),@debug_msgs) ) if @debug_msgs;
731+
$self->{pgdebug} = $pg->{pgcore}->get_debug_messages;
732+
$self->{pgwarning} = $pg->{pgcore}->get_warning_messages;
732733
$self->{pginternalerrors} = $pg->{pgcore}->get_internal_debug_messages ;
733734
$self->{pgerrors} = @{$self->{pgdebug}} || @{$self->{pgwarning}} || @{$self->{pginternalerrors}};
734735
}

0 commit comments

Comments
 (0)