but in the example specifically addressing the @ERROR, @SERROR suggestion, why wouldn't this work?

Code:
use x: "\\server\unavailableShare"
if @ERROR <> 0
errorLog()
endif



You're saying that if I don't specifically pass @ERROR and @SERROR to the function, my example wouldn't trap the right errors? I'm using that in my code right now in four different errors, have logging implemented, and each one is working perfectly... ????