In POSIX sh you may set options with set:
#!/bin/sh
set -u;
echo "$notset";
that gives expected:
parameter not set or null
but how to check if option -e is set or not?
I want at some point of my script to turn it off but set it back to on only if it was previously on.