콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

Hello Community,

What is the diffrence between ValidationError and UserError when we want to show an error message ?

Thanks.

아바타
취소
베스트 답변

ValidationError is explained very briefly in the source code (linked by Nijas Raphy) like this

class ValidationError(except_orm):
""" Violation of python constraints
Example: When you try to create a new user with a login which already exist in the db."""
def __init__(self, msg):
super(ValidationError, self).__init__(msg)


UserError is not really explained at all, but you can search the source code for examples (directly on github or do a "git grep UserError" if you have the repo locally which I highly recommend) and it will give you an idea.

아바타
취소
관련 게시물 답글 화면 활동
2
7월 22
8307
0
9월 24
1384
1
3월 15
10441
1
11월 22
7378
0
6월 21
6408