Programming for Web Service Exceptions
The Excel Services architecture presents a unique challenge for .NET when framed within the context of exceptions. In the .NET world, exceptions are defined as a violation of an assumption. As an example, consider a method that accepts two integer parameters and divides the first by the second. The implicit assumption here is that the second parameter must not be equal to zero because the mathematical result of the operation cannot be stored in a variable.
In .NET, there is no way to alert the caller to assumptions made by the method as in C++, for instance. In this case, proper exception management techniques dictate that the method promptly throw an exception if the second parameter is equal to zero because ...
Get Programming Excel® Services now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.