Great! The hacky but fast method is explained here
You can simply add an implementation of __throw_bad_alloc to your sketch
namespace std {
void __throw_bad_alloc()
{
Serial.println("Unable to allocate memory");
}
void __throw_length_error( char const*e )
{
Serial.print("Length Error :");
Serial.println(e);
}
}
I believe we'll take care of supporting full STL implementation if there is enough request in the future