catching general exceptions for curllib-calling functions.