Skip to content

Try/catch mechanism not working for C code. #11

@krisjacobs

Description

@krisjacobs

E.g.
exception_t exception;
TRY {
} catch (exception) {
}

fails with the following error message:

test.c:13:51: error: passing 'exception_t' (aka 'struct exception_t') to parameter of incompatible
type 'exception_t *' (aka 'struct exception_t *'); take the address with &
} } trycatch_exit(); } if (trycatch_catch(exception)) {
^~~~~~~~~
&
/local/Views/swoutrun/Installs/Linux/target/include/trycatch_impl.h:39:33: note: passing argument to
parameter 'exception' here
int trycatch_catch(exception_t *exception);

Note: If we add the '&' to make it 'catch (&exception)', then it compiles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions