Description
Some of the types of programming errors that newcomers do could be captured (i.e. detected and displayed).
Several of the core functions and classes use the heap (i.e. function malloc/free) with limited detection of when the heap is exhausted. Often the error is simply passed to the sketch without notice. A good example is String which generates very many questions on the forum. Also the implementation of new and delete do much the same; pass the error situation to the sketch.
Another area of concern is program lockups, i.e. sketch functions that do not return due to poor designed algorithms or hardware/wiring errors. In these cases a simple watchdog could be used to capture and signal the error state. Please see #5673.
A possible method of signaling the error situation is to use the board LED (with a rapid blink with/without pause) alternatively print to Serial (if available).
The proposal is 1) detect heap allocation failure (in core functions) and program lockup, 2) alert using LED and/or Serial.