Skip to content

Commit 63bb57f

Browse files
fix #36
1 parent 66204c6 commit 63bb57f

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

src/exceptionite/StackTrace.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import inspect
2+
import json
23
import pprint
34
import os
45
from typing import List

src/exceptionite/solutions.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ def get(cls):
5151
NotFound404(),
5252
InvalidRouteMethodType(),
5353
ModelNotFound(),
54+
DatabaseDriverNotFound(),
55+
DriverNotFound(),
5456
]
5557

5658

@@ -383,6 +385,28 @@ def regex(self):
383385
return r"No record found with the given primary key"
384386

385387

388+
class DriverNotFound:
389+
def title(self):
390+
return "Driver Is Not Installed"
391+
392+
def description(self):
393+
return ":package is required by the driver. You should install it with 'pip install :package' and refresh the page."
394+
395+
def regex(self):
396+
return r"^Could not find the '(?P<package>([\w]*))' library"
397+
398+
399+
class DatabaseDriverNotFound:
400+
def title(self):
401+
return "Database Driver Is Not Installed"
402+
403+
def description(self):
404+
return ":package is required by the database driver. You should install it with 'pip install :package' and refresh the page."
405+
406+
def regex(self):
407+
return r"^You must have the '(?P<package>([\w]*))' package installed"
408+
409+
386410
class InvalidRouteMethodType:
387411
def title(self):
388412
return "The method type is incorrect"

0 commit comments

Comments
 (0)