testing that socket IS a socket before using it
adding psuedo-backtraces by wrapping errors in catch-error. the wrapper prints the function the error occurred along with the original error. apparently works even when wrapped multiple times. siiiiick