# Panics

When writing programs for Symbian OS sooner or later your program will panic.

When there is an error the program may leave or panic. Leaves are generated after errors which are not the fault of programmers - e.g. when the network connection is lost or the device run out of memory. The program may catch a leave and inform the user that it's request couldn't be completed.

Panics are generated after an error which is because of a programmer's fault - e.g. NULL pointer dereference. In the case of a panic the system closes the application and prints a "System error" message. You can get the details of the panic if you create a file "ErrRd" in "C:\system\bootdata" (see here for a SIS package that creates the file). Then you will get the name of the module that created the panic and the panic number (e.g. KERN-EXEC 3 which is generated when accessing a NULL pointer). With this information you can try to search the panic description in the SDK help.