B4J Question Catch std::bad_alloc error


Well-Known Member
Licensed User
My programm sends data from a raspberry via USB (jSerial) to an ESP8266 pretty fast.
But as soon as i unplug the cable my programm crash with.

terminate called after throwing an instance of 'std::bad_alloc'
what():  std::bad_alloc

This also happen sometimes on the frist connect

Try catch doesnt work to catch this error.
Is there another way?
Last edited: