x = "Hello"
try:
print(x.toUpperCase())
except AttributeError:
print("错误!字符串没有 toUpperCase 方法!")
except:
print("发生了其他错误")