Skip to content

Instantly share code, notes, and snippets.

@kelvingakuo
Created November 19, 2021 11:01
Show Gist options
  • Save kelvingakuo/1c943226053481a85759b9634d0efe6b to your computer and use it in GitHub Desktop.
Save kelvingakuo/1c943226053481a85759b9634d0efe6b to your computer and use it in GitHub Desktop.
class ParsingErrorException(Exception):
__module__ = 'builtins'
class LexingErrorException(Exception):
__module__ = 'builtins'
# Usage
raise LexingErrorException(f"Syntax error occured near: {}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment