#coding=utf-8
class MyExceptin(Exception):
"this is user's Exception for check the length of name "
def __init__(self, mas):
self.mas = mas
def __str__(self):
return (self.mas,'error')
def Test():
raise MyExceptin('caojiaoyue')
try:
Test()
except MyExceptin as e:
print(123)