NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Services Based on Stack Format

The primary requirement for managed code is that it is possible to trace the stack at runtime. Different source languages may make different decisions about the layout of stack frames under their control, so the runtime uses a specific API, the code manager, to understand the format of individual stack frames. The code manager is specified either by the JITter or the source language compiler (persisted in the PE file format) that produces each native managed code method.

The code manager is used for four separate services:

CLS Rule 40: Exception objects must derive from System.Exception

CLS (consumer): Must allow exceptions derived from System.Exception to be caught and thrown.

CLS (extender): Must allow new exceptions to be defined by deriving them from System.Exception.

CLS (framework): Should, where reasonable, throw exceptions derived from System.Exception to signal error conditions, rather than returning status flags or success codes. Must not throw any value not derived from System.Exception.