# # # Copyright (c) 2009-2012 NetApp Inc. # All rights reserved. # ## @summary Provide an exception class that is a subclass of ## NATE::BaseException that will be thrown when an ## opertion doesn't complete within given time period ## ## @author dl-nacl-dev@netapp.com ## @status Shared ## @pod here =pod =head1 Package Name NACL::Exceptions::Timeout =head1 Description The Exception gets thrown when an operation doesn't complete within given time period. For Example, Default timeout for Wafliron is 2400 sec (unless different timeout value is specified) in NACL::MTask::Wafliron. So, if wafliron exceeds this time period, this library throws NACL::Exceptions::Timeout exception. =head1 EXAMPLE use NACL::Exceptions::Timeout qw(:try); try { $wafliron_obj->wait_for_completion( 'method-timeout' => 600 ); } catch NACL::Exceptions::Timeout with { $Log->comment("Iron did not complete in $opts{'method-timeout'} seconds"); }; =head1 See Also Package inherits from the BaseException module in NATE. =cut package NACL::Exceptions::Timeout; # This should really just inherit from BaseException, but earlier a number # of operations that should have thrown this exception were throwing an # APISet TimeoutException, so we're subclassing the APISet TimeoutException # for backwards compatibility. # The POD above states it inherits from BaseException since the inheriting # from APISet TimeoutException is purely for backwards compatibility. use base qw(NACL::APISet::Exceptions::TimeoutException); 1;