# $Id:$ # # Copyright (c) 2001-2013 NetApp Inc. # All rights reserved. # ## @summary Provide an exception class that is a subclass of ## NACL::APISet::Exceptions::UnexpectedOutputException that will ## be thrown when the expected output is not obtained from a command ## ## @author dl-nacl-dev@netapp.com ## @status public ## @pod here =pod =head1 Package Name NACL::Exceptions::UnexpectedOutputException =head1 Author dl-nacl-dev@netapp.com =head1 Description An exception to be thrown when the expected output is not obtained from a command run =head1 NACL::Exceptions::UnexpectedOutputException =head2 Expected use This is mainly to report the errors when an expected output is not found. =head2 Base Class NACL::APISet::Exceptions::UnexpectedOutputException =head1 See Also Package inherits from the following modules. See these modules for further interface details. B =cut package NACL::Exceptions::UnexpectedOutputException; ## Note that the package inherits NACL::APISet::Exceptions::UnexpectedOutputException use base qw( NACL::APISet::Exceptions::UnexpectedOutputException ); use Params::Validate qw(validate_with SCALAR UNDEF); use NATE::BaseException; use NATE::Log qw(log_global); my $Log = log_global(); my $may_enter = $Log->may_enter(); my $may_exit = $Log->may_exit(); sub new { $Log->enter() if $may_enter; my ( $self, @args ) = @_; my %args = validate_with( params => \@args, spec => { text => { type => SCALAR }, }, allow_extra => 1 ); my $text = delete $args{text}; $self->NATE::BaseException::new( $text ); $Log->exit() if $may_exit; } 1;