summaryrefslogtreecommitdiffstatshomepage
path: root/tools/codeformat.py
diff options
context:
space:
mode:
authorThorsten von Eicken <tve@voneicken.com>2020-03-26 23:17:35 -0700
committerDamien George <damien@micropython.org>2020-07-20 23:41:45 +1000
commit9aa214077e6d1e0fba1a775431fedea4c8d76558 (patch)
treed04efd64de63ed54a32b53392125bebf2f394672 /tools/codeformat.py
parentc7f7c0214c433d52204fe73613bd6162507a0482 (diff)
downloadmicropython-9aa214077e6d1e0fba1a775431fedea4c8d76558.tar.gz
micropython-9aa214077e6d1e0fba1a775431fedea4c8d76558.zip
extmod/modussl: Improve exception error messages.
This commit adds human readable error messages when mbedtls or axtls raise an exception. Currently often just an EIO error is raised so the user is lost and can't tell whether it's a cert error, buffer overrun, connecting to a non-ssl port, etc. The axtls and mbedtls error raising in the ussl module is modified to raise: OSError(-err_num, "error string") For axtls a small error table of strings is added and used for the second argument of the OSErrer. For mbedtls the code uses mbedtls' built-in strerror function, and if there is an out of memory condition it just produces OSError(-err_num). Producing the error string for mbedtls is conditional on them being included in the mbedtls build, via MBEDTLS_ERROR_C.
Diffstat (limited to 'tools/codeformat.py')
0 files changed, 0 insertions, 0 deletions