Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in rest of 'modules/'

This commit is contained in:
Robin Hübner 2019-08-11 10:49:53 +02:00
parent 3418f76a9e
commit 8aeade74db
29 changed files with 72 additions and 169 deletions

View file

@ -68,10 +68,8 @@ void WebRTCDataChannelJS::_on_error() {
}
void WebRTCDataChannelJS::_on_message(uint8_t *p_data, uint32_t p_size, bool p_is_string) {
if (in_buffer.space_left() < (int)(p_size + 5)) {
ERR_EXPLAIN("Buffer full! Dropping data");
ERR_FAIL();
}
ERR_FAIL_COND_MSG(in_buffer.space_left() < (int)(p_size + 5), "Buffer full! Dropping data.");
uint8_t is_string = p_is_string ? 1 : 0;
in_buffer.write((uint8_t *)&p_size, 4);