> In the following bash code snippet; my main aim is to throw a string >'Unhandled exception occurred' using trap command. Trap is a mechanism for signal handling. You cannot do exception handling with trap. Reading: man 7 signal. Manas