-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy path__init__.py
More file actions
55 lines (43 loc) · 1.34 KB
/
__init__.py
File metadata and controls
55 lines (43 loc) · 1.34 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# -*- coding: utf-8 -*-
#
# Error Tracking app
#
# :copyright: 2023 Sonu Kumar
# :license: BSD-3-Clause
#
__version__ = '3.1.1'
__author__ = 'Sonu Kumar'
__email__ = 'sonunitw12@gmail.com'
from error_tracker.libs.mixins import *
from error_tracker.libs.exception_formatter import *
flaskInstalled = False
try:
import flask
flaskInstalled = True
except ImportError:
pass
if flaskInstalled:
from error_tracker.flask import *
from error_tracker.flask.utils import configure_scope as flask_scope
djangoInstalled = False
try:
import django
djangoInstalled = True
except ImportError as e:
pass
if djangoInstalled:
from error_tracker.django import *
from error_tracker.django.apps import DjangoErrorTracker
from error_tracker.django.utils import capture_message, track_exception, configure_scope, capture_exception
__all__ = [
# flask modules
"AppErrorTracker", "DefaultFlaskContextBuilder", "flask_scope",
# mixin classes
"NotificationMixin", "ModelMixin", "MaskingMixin",
"ContextBuilderMixin", "TicketingMixin", "ViewPermissionMixin",
# Django modules
"DefaultDjangoContextBuilder", "DjangoErrorTracker", "DefaultDjangoViewPermission",
"capture_message", "track_exception", "configure_scope", "capture_exception",
# lower level methods
"format_exception", "print_exception"
]