fix(esp-modem): Add filename/line info to exception message

This is useful if exceptions are enabled, but caught internally on C++ API boundary
This commit is contained in:
David Cermak
2022-07-13 08:45:43 +02:00
parent 341fcb0f40
commit 89e1bd27b3
13 changed files with 58 additions and 36 deletions

View File

@ -61,7 +61,7 @@ int main()
bool pin_ok = true;
if (dce->read_pin(pin_ok) == command_result::OK && !pin_ok) {
throw_if_false(dce->set_pin(CONFIG_EXAMPLE_SIM_PIN) == command_result::OK, "Cannot set PIN!");
ESP_MODEM_THROW_IF_FALSE(dce->set_pin(CONFIG_EXAMPLE_SIM_PIN) == command_result::OK, "Cannot set PIN!");
usleep(1000000);
}
std::string str;