Commit 60d47c8c authored by Christian Fibich's avatar Christian Fibich Committed by Stefan Tauner
Browse files

[Issue #11] Validation warnings are now logged as WARN messages when they ocurr

during validation of GUI elements.
parent 974021c8
......@@ -376,7 +376,7 @@ sub validate_fiu_value {
# \param old (optional) previously valid value
# \param log_func (optional) the (log4perl) log function to use
# (defaul is \&Log::Log4perl::Logger::trace)
sub validate_value ($$$;$$) {
sub validate_value {
my $logger = get_logger("");
my ($map_ref, $k, $v_ref, $dep_ref, $old, $log_func) = @_;
$log_func = \&Log::Log4perl::Logger::trace if !defined($log_func);
......
......@@ -1268,6 +1268,7 @@ sub _validate_fiu_entry {
}
sub _validate_entry {
my $logger = get_logger("");
my ($map, $self, $widget, $name, $old_ref, $new_ref, $diff, $old_str, $char_idx, $brokentype) = @_;
my $dep_ref;
......@@ -1276,7 +1277,7 @@ sub _validate_entry {
$dep_ref = \$self->{'settings'}->{'design'}->{$map->{$name}->{'depends_on'}};
}
my $ok = FIJI::Settings::validate_value($map, $name, $new_ref, $dep_ref, $$old_ref);
my $ok = FIJI::Settings::validate_value($map, $name, $new_ref, $dep_ref, $$old_ref,\&Log::Log4perl::Logger::warn);
_highlight_widget($widget, (!$ok));
# Validate all matching or depending widgets
......
......@@ -859,7 +859,7 @@ sub _validate_design_entry {
sub _validate_entry {
my $logger = get_logger("");
my ($map, $self, $widget, $name, $old_ref, $new_ref, $diff, $old_str, $char_idx, $brokentype) = @_;
my $stat = FIJI::Tests::validate_value($map, $name, $new_ref, $$old_ref);
my $stat = FIJI::Tests::validate_value($map, $name, $new_ref, $$old_ref,\&Log::Log4perl::Logger::warn);
my $dyn = 1;
my $new = $$new_ref;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment