Merge pull request #4589 from hugodahl/feature/Remove-MicroPython-mention-in-error-messages

Make error messages platform agnostic
This commit is contained in:
Dan Halbert 2021-04-10 21:30:17 -04:00 committed by GitHub
commit c333acdbad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 13 deletions

View File

@ -438,7 +438,7 @@ msgid "Attempt to allocate %d blocks"
msgstr "" msgstr ""
#: supervisor/shared/safe_mode.c #: supervisor/shared/safe_mode.c
msgid "Attempted heap allocation when MicroPython VM not running." msgid "Attempted heap allocation when VM not running."
msgstr "" msgstr ""
#: shared-bindings/wifi/Radio.c #: shared-bindings/wifi/Radio.c
@ -1008,6 +1008,10 @@ msgstr ""
msgid "Failed to write internal flash." msgid "Failed to write internal flash."
msgstr "" msgstr ""
#: supervisor/shared/safe_mode.c
msgid "Fatal error."
msgstr ""
#: py/moduerrno.c #: py/moduerrno.c
msgid "File exists" msgid "File exists"
msgstr "" msgstr ""
@ -1398,14 +1402,6 @@ msgstr ""
msgid "Messages limited to 8 bytes" msgid "Messages limited to 8 bytes"
msgstr "" msgstr ""
#: supervisor/shared/safe_mode.c
msgid "MicroPython NLR jump failed. Likely memory corruption."
msgstr ""
#: supervisor/shared/safe_mode.c
msgid "MicroPython fatal error."
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Microphone startup delay must be in range 0.0 to 1.0" msgid "Microphone startup delay must be in range 0.0 to 1.0"
msgstr "" msgstr ""
@ -1457,6 +1453,10 @@ msgstr ""
msgid "Must use a multiple of 6 rgb pins, not %d" msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr "" msgstr ""
#: supervisor/shared/safe_mode.c
msgid "NLR jump failed. Likely memory corruption."
msgstr ""
#: ports/esp32s2/common-hal/nvm/ByteArray.c #: ports/esp32s2/common-hal/nvm/ByteArray.c
msgid "NVS Error" msgid "NVS Error"
msgstr "" msgstr ""
@ -3194,6 +3194,10 @@ msgstr ""
msgid "invalid cert" msgid "invalid cert"
msgstr "" msgstr ""
#: py/compile.c
msgid "invalid decorator"
msgstr ""
#: extmod/uos_dupterm.c #: extmod/uos_dupterm.c
msgid "invalid dupterm index" msgid "invalid dupterm index"
msgstr "" msgstr ""

View File

@ -768,7 +768,7 @@ STATIC bool compile_built_in_decorator(compiler_t *comp, int name_len, mp_parse_
} }
if (name_len != 2) { if (name_len != 2) {
compile_syntax_error(comp, name_nodes[0], translate("invalid micropython decorator")); compile_syntax_error(comp, name_nodes[0], translate("invalid decorator"));
return true; return true;
} }

View File

@ -170,13 +170,13 @@ void print_safe_mode_message(safe_mode_t reason) {
serial_write_compressed(translate("Crash into the HardFault_Handler.")); serial_write_compressed(translate("Crash into the HardFault_Handler."));
return; return;
case MICROPY_NLR_JUMP_FAIL: case MICROPY_NLR_JUMP_FAIL:
serial_write_compressed(translate("MicroPython NLR jump failed. Likely memory corruption.")); serial_write_compressed(translate("NLR jump failed. Likely memory corruption."));
return; return;
case MICROPY_FATAL_ERROR: case MICROPY_FATAL_ERROR:
serial_write_compressed(translate("MicroPython fatal error.")); serial_write_compressed(translate("Fatal error."));
break; break;
case GC_ALLOC_OUTSIDE_VM: case GC_ALLOC_OUTSIDE_VM:
serial_write_compressed(translate("Attempted heap allocation when MicroPython VM not running.")); serial_write_compressed(translate("Attempted heap allocation when VM not running."));
break; break;
#ifdef SOFTDEVICE_PRESENT #ifdef SOFTDEVICE_PRESENT
// defined in ports/nrf/bluetooth/bluetooth_common.mk // defined in ports/nrf/bluetooth/bluetooth_common.mk