I come from C# and I'm used to work with try-catch blocks in order to deal with exceptions.
I've found out that in Arduino this is not used as it requieres lots of resources for a small uC, so, I wonder now what happens when there is an exception in code.
Now I'm using the serial port to communicate with other devices that I didn't program. So, I have some doubts related to how robust is my code.
Actually I have not a problem yet, but I would appreciate you tell me some best practices I should follow. Should I always enable watchdog? What happens if I try to convert a string wich it was suposed to contain numbers to int, but I receive not numbers but characters? Or what happens if I receive a too long string? Will the device run out of memory in some cases?
I'm sorry if it's a wide and not focused question, but I appreciate any suggestion.
Thanks in advance