Click here to Skip to main content
13,143,774 members (34,693 online)
Click here to Skip to main content

Stats

933.5K views
5.8K downloads
567 bookmarked
Posted 15 Apr 2002

How a C++ compiler implements exception handling

, 15 Apr 2002
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
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.170915.1 | Last Updated 16 Apr 2002
Article Copyright 2002 by Vishal Kochhar
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid