added try-catch to getInfo() call section