Python - Custom Exceptions
What will be the output of this code?
class MyError(Exception):
pass
def test(value):
if value < 0:
raise MyError("Negative value")
return value
try:
print(test(-1))
except MyError as e:
print(e)