Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/exception.h

    rcbce272 r38ac6ec  
    1010// Created On       : Mon Jun 26 15:11:00 2017
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Aug  4 15:20:00 2017
    13 // Update Count     : 5
     12// Last Modified On : Tus Jul 11 16:31:00 2017
     13// Update Count     : 2
    1414//
    1515
    16 #pragma once
     16#ifndef EXCEPTION_H
     17#define EXCEPTION_H
    1718
     19
     20// Later to be a special structure type.
     21typedef int exception;
    1822
    1923#ifdef __CFORALL__
    2024extern "C" {
    2125#endif
    22 
    23 struct __cfaehm__base_exception_t;
    24 typedef struct __cfaehm__base_exception_t exception;
    25 struct __cfaehm__base_exception_t_vtable {
    26         const struct __cfaehm__base_exception_t_vtable * parent;
    27         size_t size;
    28         void (*copy)(struct __cfaehm__base_exception_t *this,
    29                      struct __cfaehm__base_exception_t * other);
    30         void (*free)(struct __cfaehm__base_exception_t *this);
    31         const char (*msg)(struct __cfaehm__base_exception_t *this);
    32 };
    33 struct __cfaehm__base_exception_t {
    34         struct __cfaehm__base_exception_t_vtable const * virtual_table;
    35 };
    36 extern struct __cfaehm__base_exception_t_vtable
    37         ___cfaehm__base_exception_t_vtable_instance;
    38 
    3926
    4027// Used in throw statement translation.
     
    4936    int (*match_block)(exception * except));
    5037
    51 // Clean-up the exception in catch blocks.
    52 void __cfaehm__cleanup_terminate(void * except);
    53 
    5438// Data structure creates a list of resume handlers.
    5539struct __cfaehm__try_resume_node {
     
    5842};
    5943
    60 // These act as constructor and destructor for the resume node.
    6144void __cfaehm__try_resume_setup(
    6245    struct __cfaehm__try_resume_node * node,
     
    6649
    6750// Check for a standard way to call fake deconstructors.
    68 struct __cfaehm__cleanup_hook {};
     51struct __cfaehm__cleanup_hook {
     52};
    6953
    7054#ifdef __CFORALL__
    7155}
    7256#endif
     57
     58#endif //EXCEPTION_H
Note: See TracChangeset for help on using the changeset viewer.