# smilepyerror
python error class is, to make it simple structure
```
# external library
from smilepyerror.ErrorBase import ErrorBase
# or pypi
# from ErrorBase import ErrorBase
class TestClass:
"""
"""
def __init__(self):
"""
"""
# private
self.error = ErrorBase()
def divideByZero(self, inputData: int) -> float:
"""
"""
self.error.setFalse()
try:
return inputData / 0
exception Exception as e:
self.error.setTrue(message= str(e))
return -1
# render code
test = TestClass()
result = test.divideByZero(22)
if test.error.isTrue():
print(f'Show the messag error please {test.error.getMessage()}')
```
Raw data
{
"_id": null,
"home_page": "https://github.com/sitthykun/smilepyerror",
"name": "SmilePyError",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "python error base class,errorbase,error",
"author": "Sitthykun LY",
"author_email": "ly.sitthykun@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/6f/01/ef889940fd14d771e8d29f6b9a9fa78cae44012f46703143c55d628b5363/SmilePyError-1.0.2.tar.gz",
"platform": "All",
"description": "# smilepyerror\npython error class is, to make it simple structure\n\n```\n# external library\nfrom smilepyerror.ErrorBase import ErrorBase\n# or pypi\n# from ErrorBase import ErrorBase\n\n\nclass TestClass:\n\t\"\"\"\n \t\"\"\"\n\tdef __init__(self):\n \t\t\"\"\"\n \t\t\"\"\"\n\t \t# private\n\t \tself.error\t= ErrorBase()\n\n \tdef divideByZero(self, inputData: int) -> float:\n \t\t\"\"\"\n\t \t\"\"\"\n \t\tself.error.setFalse()\n\n \t\ttry:\n\t \t\treturn inputData / 0\n\t\n\t\texception Exception as e:\n \t\t\tself.error.setTrue(message= str(e))\n \t\t\treturn -1\n\n\n# render code\ntest\t= TestClass()\nresult\t= test.divideByZero(22)\n\nif test.error.isTrue():\n\tprint(f'Show the messag error please {test.error.getMessage()}')\n```\n\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "python error class is, to make it simple structure",
"version": "1.0.2",
"project_urls": {
"Homepage": "https://github.com/sitthykun/smilepyerror"
},
"split_keywords": [
"python error base class",
"errorbase",
"error"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d57bc8815ecbb86b7b73a5e06aa8502b8d1ac539e6673b8baabc04f900211b84",
"md5": "29b6f857bfaf912ae7916f973e35d99a",
"sha256": "6f26293aeeff62a1eead4f8fd69515803c9934a5935fe79e471c5d507b1f7d7b"
},
"downloads": -1,
"filename": "SmilePyError-1.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "29b6f857bfaf912ae7916f973e35d99a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 2889,
"upload_time": "2024-01-09T04:57:06",
"upload_time_iso_8601": "2024-01-09T04:57:06.527336Z",
"url": "https://files.pythonhosted.org/packages/d5/7b/c8815ecbb86b7b73a5e06aa8502b8d1ac539e6673b8baabc04f900211b84/SmilePyError-1.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6f01ef889940fd14d771e8d29f6b9a9fa78cae44012f46703143c55d628b5363",
"md5": "58fbb40898c0ca9546556a8caeed74ae",
"sha256": "e624dfde2376fefe027a8c6a7ae65dfb85ec3d7066c97146dd7b0448d796c605"
},
"downloads": -1,
"filename": "SmilePyError-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "58fbb40898c0ca9546556a8caeed74ae",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 2775,
"upload_time": "2024-01-09T04:57:08",
"upload_time_iso_8601": "2024-01-09T04:57:08.168438Z",
"url": "https://files.pythonhosted.org/packages/6f/01/ef889940fd14d771e8d29f6b9a9fa78cae44012f46703143c55d628b5363/SmilePyError-1.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-09 04:57:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sitthykun",
"github_project": "smilepyerror",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "smilepyerror"
}