File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -806,3 +806,29 @@ the corresponding functions, or you can use the command-line client
806
806
807
807
See the MicroPython forum for other community-supported alternatives
808
808
to transfer files to an ESP32 board.
809
+
810
+ Error handling
811
+ --------------
812
+
813
+ To raise eroor from MicroPython module::
814
+
815
+ import errno
816
+ raise(OSError(errno.ETIMEDOUT))
817
+
818
+ >>> OSError: [Errno 116] ETIMEDOUT
819
+
820
+ or::
821
+
822
+ raise(ValueError('Must be positive'))
823
+
824
+ >>> ValueError: Must be positive
825
+
826
+ Internally in C code esp-idf raises ecceptions in format::
827
+
828
+ >>> OSError: (-12293, 0x3005, 'ESP_ERR_WIFI_MODE')
829
+
830
+ Additional information about error codes see on Espressif esp-idf
831
+ `esp_err.h <https://github.com/espressif/esp-idf/blob/master/components/esp_common/include/esp_err.h >`_,
832
+ `esp_wifi.h <https://github.com/espressif/esp-idf/blob/master/components/esp_wifi/include/esp_wifi.h >`_,
833
+ `esp_netif_types.h <https://github.com/espressif/esp-idf/blob/master/components/esp_netif/include/esp_netif_types.h >`_
834
+ etc.
You can’t perform that action at this time.
0 commit comments