-
-
Notifications
You must be signed in to change notification settings - Fork 368
Expand file tree
/
Copy pathexceptions.py
More file actions
30 lines (20 loc) · 822 Bytes
/
exceptions.py
File metadata and controls
30 lines (20 loc) · 822 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Copyright 2020 Camptocamp SA (http://www.camptocamp.com)
# @author Simone Orsi <simahawk@gmail.com>
from odoo import exceptions as odoo_exceptions
class RESTServiceDispatchException(Exception):
rest_json_info = {}
def __init__(self, message, log_entry_url):
super().__init__(message)
self.rest_json_info = {"log_entry_url": log_entry_url}
class RESTServiceMissingErrorException(
RESTServiceDispatchException, odoo_exceptions.MissingError
):
"""Missing error wrapped exception."""
class RESTServiceUserErrorException(
RESTServiceDispatchException, odoo_exceptions.UserError
):
"""User error wrapped exception."""
class RESTServiceValidationErrorException(
RESTServiceDispatchException, odoo_exceptions.ValidationError
):
"""Validation error wrapped exception."""