ARMmbed

How does std::abort() work on nucleo board?

In the standard library the function std::abort() fires the abort signal.

in a normal operating system I can catch the abort signal like that:

#include <signal.h>

extern "C" void sigHandler(int signal_number)
{
    printf("abort signal received!\n");
    exit(-1);
}

signal(SIGABRT, &sigHandler);

Can I do it in the same way on mbed? if not how can I do it?