Question: I typed this into Google, but I only found how-tos in C++.

How can I do it in C?

Answer: 
Plain old C doesn't actually support exceptions natively.

You can use alternative error handling strategies, such as:

* returning an error code
* returning `FALSE` and using a `last_error` variable or function.

See <http://en.wikibooks.org/wiki/C_Programming/Error_handling>.
In C we can't use try case to handle the error.
but if you can use Windows.h so you can:

```
#include <stdio.h>
#include <Windows.h>
#include <setjmp.h>
jmp_buf Buf;

NTAPI Error_Handler(struct _EXCEPTION_POINTERS *ExceptionInfo)
{
    printf("co loi roi ban oi.!!!\r\n");
    longjmp(Buf, 1);
}

void main()
{
    AddVectoredExceptionHandler(1, Error_Handler);
    int x = 0;
    printf("start main\r\n");
    if (setjmp(Buf) == 0)
    {
        int y = 1 / x;
    }
    printf("end main\r\n");

}

```