Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/exceptions/conditional.cfa

    re68d092 r6d43cdde  
    44// up the non-trivial exception is reasonable to do.
    55
    6 #include <exception.hfa>
     6#include "except-mac.hfa"
    77#include <stdio.h>
    88
    9 VTABLE_DECLARATION(num_error)(
     9DECLARE_EXCEPT(num_error, BASE_EXCEPT,
    1010        int (*code)(num_error *this);
    1111);
     
    3636    this.num = other.num;
    3737}
     38void copy(num_error * this, num_error * other) {
     39        *this = *other;
     40}
    3841void ^?{}(num_error & this) {
    3942    if( this.msg ) free( this.msg );
     
    4346}
    4447
    45 VTABLE_INSTANCE(num_error)(
    46         num_error_msg,
    47         num_error_code,
     48VTABLE_INSTANCE(num_error, BASE_EXCEPT, copy, ^?{},
     49        num_error_msg, num_error_code
    4850);
    4951
     
    5658
    5759        try {
    58                 throw &exc;
     60                THROW(&exc);
    5961        } catch (num_error * error ; 3 == error->virtual_table->code( error )) {
    6062                caught_num_error(3, error);
     
    6466
    6567        try {
    66                 throwResume &exc;
     68                THROW_RESUME(&exc);
    6769        } catchResume (num_error * error ; 3 == error->virtual_table->code( error )) {
    6870                caught_num_error(3, error);
Note: See TracChangeset for help on using the changeset viewer.