try { my $data = $self->__validate_added_data; # add the data } catch FormValidationError with { # process the error };