Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

Owo Sugiana / async-web

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • async-web
  • async_web
  • exceptions.py
  • Owo Sugiana's avatar
    Kali pertama · 6c90ccc2
    Owo Sugiana committed Mar 07, 2023
    6c90ccc2
exceptions.py 283 Bytes
RawBlameHistoryPermalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14
from io import StringIO
import traceback


def exception_message():
    with StringIO() as f:
        traceback.print_exc(file=f)
        return f.getvalue()


class BaseError(Exception):
    def __init__(self, code, message):
        self.code = code
        self.message = message