Hi,
exception filters:-
Exception filters allow you to specify a conditional clause for each
catch block. Instead of a catch block handling all exceptions of a
specific type, they allow us to write catch blocks that handle
exceptions of a specific type (or all exceptions) only when a certain
condition is true. For example, consider the following Visual Basic
.NET code:
Try
' do something that could throw an exception
Catch e As FileNotFoundException When MyFilterMethod(e)
Console.WriteLine(“first“)
Catch e As FileNotFoundException When MyFilterMethod2(e)
Console.WriteLine(“second“)
Catch e As FileNotFoundException When MyFilterMethod3(e)
Console.WriteLine(“third“)
Catch e As DivideByZeroException
Console.WriteLine(“fourth“)
End Try
use of extendable stored procedures:-
Extended stored procedures are a very powerful way to extend the
functionality of SQL Server. The following excerpt is from the SQL
Server Books Online:
Extended stored procedures provide a way to dynamically load and execute
a function within a dynamic-link library (DLL) in a manner similar to
that of a stored procedure, seamlessly extending SQL Server
functionality. Actions outside of SQL Server can be easily triggered and
external information returned to SQL Server. Return status codes and
output parameters (identical to their counterparts in regular stored
procedures) are also supported. SQL Server includes system stored
procedures that add (sp_addextendedproc), drop (sp_dropextendedproc),
and provide information about (sp_helpextededproc) extended stored
procedures.
You must treat the extended stored procedure DLL as any other DLL
development: It is shared code, and multiple threads can access it
at the same time. As with any production-worthy project, make sure to use thorough design and complete testing.
For re throw :- you havnt handled the exception fully in your policy, but as you have caught it, the exception no longer exists so rethrowing it just makes sure it will ripple up the stack.if youdont rethrow it you will simply cause the exception to disappear.
hope it helps you.