Glad you like it and I really appreciate you sharing it. These types of features often go unnoticed because we don't do a great job publishing them out there. When Anamitra talked about adding it, I was extremely excited. There are scenarios where an error is a direct indicator of the health of the system (like a closed database connection error) and customers might want to send this to some sort of monitoring system.
On your scripts, you can simplify it a bit. UserInfo has a method getUserLoginDetails() that returns a UserLoginDetails object that has additional information about the user, including the first & lastname. We use this to build our whoami request for the REST API. You should be able to do something like:
userInfo.getUserLoginDetails().getFirstName()
That way you're operating with data in memory instead of opening a set.
------------------------------
Steven Shull
IBM
------------------------------