Click here to Skip to main content
12,504,695 members (62,531 online)
Click here to Skip to main content

Stats

895.9K views
5.7K downloads
562 bookmarked
Posted

How a C++ compiler implements exception handling

, 15 Apr 2002 CPOL
An indepth discussion of how VC++ implements exception handling. Source code includes exception handling library for VC++.
#ifndef _INCLUDED_EXCEPTION_STORAGE_H_
#define _INCLUDED_EXCEPTION_STORAGE_H_

namespace my_handler
{
    struct excpt_info;
    
    class exception_storage
    {
    public:
        exception_storage() throw()
        {
            set(0, 0);
        }

        void set(void *pexc, const excpt_info *pexc_info) throw()
        {
            m_pexc = pexc;
            m_pinfo = pexc_info;
        }

        const excpt_info * get_exception_info() throw()
        {
            return m_pinfo;
        }

        void * get_exception() throw()
        {
            return m_pexc;
        }
    
    private:
        const excpt_info *m_pinfo;
        void *m_pexc;
    };
}

#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Vishal Kochhar
Web Developer
Canada Canada
No Biography provided

You may also be interested in...

Pro
Pro
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160919.1 | Last Updated 16 Apr 2002
Article Copyright 2002 by Vishal Kochhar
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid