Ai-Thinker-Open / GPRS_C_SDK

Ai-Thinker A9/A9G GPRS (with GPS(A9G)) module C development SDK
https://ai-thinker-open.github.io/GPRS_C_SDK_DOC
MIT License
449 stars 235 forks source link

Error handeling such as try{}catch() #492

Closed win32cpp closed 3 years ago

win32cpp commented 3 years ago

Hi, How can I manage error in my code? (such as try{} catch or any other type)

ZakKemble commented 3 years ago

C does not support error handling. Instead, you must check the return value of the function to make sure it was successful. You'll need to check the documentation for the function to find out what value means success or failure etc.

win32cpp commented 3 years ago

thank you.