https://github.com/nelqatib/mbed-vim/blob/c42067c3880496a14576d672ccaa5c671468bd9e/plugin/mbed.vim#L179
It would be better if we could add a check for "ERROR" pattern in the output of a compile command. The MbedCompile() function would be less error-prone regarding the decision of opening or not a buffer.