# $Id: //depot/prod/test/nacldev/lib/NACL/Exceptions/DataInconsistent.pm#1 $ # # Copyright (c) 2009-2011 NetApp Inc. # All rights reserved. # ## @summary Provide an exception class that is a subclass of ## NATE::BaseException that will be thrown when data verification shows presence of inconsistency. ## ## @author dl-nacl-dev@netapp.com ## @status Shared ## @pod here =head1 NAME NACL::Exceptions::DataInconsistent =head1 DESCRIPTION This exception is thrown when snapmirror check does not pass. In addition to the attributes that exception objects generally contain, this exception also contains C and C attribute. This is a scalar, which will hold the node name and the path of the logfile where error details are logged. =head1 ATTRIBUTES =head2 node =over This attribute is a scalar, which will hold the node name where log file is present. =back =head2 path =over This attribute is a scalar, which will hold the path of the file where reason for snapmirror check fail will be logged. =back =head1 EXAMPLE use NACL::Exceptions::DataInconsistent; try { NACL::STask::Snapmirror->check(command_interface => $node_ci, 'destination-path'=> $Dst_obj, 'nacltask_if_mismatch' => 'die'); } catch NACL::Exceptions::DataInconsistent with { # Expected my $ex = shift; $Log->comment( "Snapmirror check failed" . $exception->text() ); $Log->comment( "Node ".$ex->node() ); $Log->comment( "Path of logfile ".$ex->path() ); }; =cut package NACL::Exceptions::DataInconsistent; use base qw(NATE::BaseException); use Class::MethodMaker [ scalar => 'node', scalar => 'path' ]; 1;