Spring.Transaction.Interceptor.RollbackRuleAttribute.RollbackRuleAttribute C# (CSharp) Method

RollbackRuleAttribute() public method

Creates a new instance of the Spring.Transaction.Interceptor.RollbackRuleAttribute class for the suplied exceptionType.

The exception class must be System.Exception or a subclass.

This is the preferred way to construct a Spring.Transaction.Interceptor.RollbackRuleAttribute, matching the exception class and subclasses.

public RollbackRuleAttribute ( Type exceptionType ) : System
exceptionType System.Type /// The class that will trigger a rollback. ///
return System
		public RollbackRuleAttribute( Type exceptionType )
		{
		    AssertUtils.ArgumentNotNull(exceptionType, "exceptionType");            
			if ( ! typeof(Exception).IsAssignableFrom( exceptionType ) )
			{
				throw new ArgumentException("Cannot construct rollback rule from " + exceptionType + "; " + "It's not an Exception");
			}
			_exceptionName = exceptionType.Name;
		}

Same methods

RollbackRuleAttribute::RollbackRuleAttribute ( string exceptionName ) : System