my $data = $self->__validate_added_data; if ( UNIVERSAL::isa( $data, 'Foo::Form' ) ) { # add the data } else { # process the error } #### try { my $data = $self->__validate_added_data; # add the data } catch FormValidationError with { # process the error };