mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-11 18:11:21 +08:00
17 lines
338 B
Python
17 lines
338 B
Python
#coding: utf-8
|
|
from termcolor import colored
|
|
|
|
class MyBaseError(BaseException):
|
|
def __init__(self, msg):
|
|
self.msg = msg
|
|
self.color_msg = colored(msg, 'red', attrs=['bold'])
|
|
|
|
def __repr__(self):
|
|
return self.msg
|
|
|
|
def __str__(self):
|
|
return self.color_msg
|
|
|
|
class ParamsError(MyBaseError):
|
|
pass
|