O'Reilly logo

.NET Common Language Runtime Unleashed by Kevin Burton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Cross Language Exceptions

One of the most exciting new features of the CLR and a managed environment is that not only can programs built with different languages interact, but they can also seamlessly share exceptions. When you think about what an exception is and how it needs to be processed (walking stack, continuing execution in a different stack frame, and so on), this interoperability is pretty amazing.

You have seen many examples of how to build an exception class and throw that exception in a number of different languages. Now you will concentrate on the language interoperability when it comes to exceptions thrown under the control of the CLR. Listing 15.19 shows exceptions caught from three different languages. The complete source for ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required