Handle Banned API Exception for Issue #119.

For Issue #119, we should handle banned API Exception, and display
a messagebox for users.

Also fix some code style.