We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 042809b commit 9bb2d57Copy full SHA for 9bb2d57
public/consolidated/python.json
@@ -101,6 +101,19 @@
101
{
102
"categoryName": "Error Handling",
103
"snippets": [
104
+ {
105
+ "title": "Create Custom Exception Type",
106
+ "description": "Create a Custom Exception Type that can be called with raise.",
107
+ "author": "mrcool7387",
108
+ "tags": [
109
+ "python",
110
+ "error-creation",
111
+ "organisation",
112
+ "utility"
113
+ ],
114
+ "contributors": [],
115
+ "code": "class ExceptionName(BaseException):\n def __init__(message: str):\n super().__init__(message)\n\n# Usage\na: int = 1\n\nif a > 0:\n raise ExceptionName('Error Message')\n"
116
+ },
117
118
"title": "Handle File Not Found Error",
119
"description": "Attempts to open a file and handles the case where the file does not exist.",
0 commit comments