TW'sLE!!!
TW'sLE!!! (stands for The World's Longest Error!!!) is a joke esolang by User:iddi01 in which every single program instantly raises an error about 470000 lines long, the world's longest error.
Errology
Errology is (obviously) the study of errors and how to produce them. It is one of the few things that depends heavily on version numbers (and most of the time, earlier versions are better). Errology allows for making unimaginably long errors from very compact code (such as TW'sLE!!!), very weird/unusual errors (and more unusual than you could imagine) and error-reliant programs (such as the interpreter of Mеmоrу which uses KeyboardInterrupt
error as a prompt to start execution).
This page is an introduction to Errology and what amazing things could be done with it.
Implementation
Python 3.8.10/Ubuntu 20.04 (clsmvks2.py) (Please make sure that the filename storing the program is clsmvks2.py or won't work)
def importer(): try: CM() except: CM() finally: CM() class CM: def __new__(cls): try: return clsmvks2.CM.__new__(cls) except Exception as exc: try: raise Exception from exc except Exception as err: try: raise BaseException from err except BaseException as trd: try: raise PendingDeprecationWarning from trd except PendingDeprecationWarning as trderr: help('hwcae') import clsmvks2 try: importer() except: importer() finally: importer()
Place a file named hwcae.py containing the line below in the same folder as the program or the error will be much shorter:
dwcae = type('cannotdir', (object,), {...: 'abc'})
The code is not working in latest Python versions, so here's a much weaker one to compensate (tsterr.py):
def err(): try: err() except RecursionError as exc: try: import tsterr except: import tsterr finally: import tsterr raise PendingDeprecationWarning().with_traceback(exc.__traceback__) from exc finally: try: import tsterr except: import tsterr finally: import tsterr try: import tsterr except: import tsterr finally: import tsterr try: err() except: err() finally: err()
The best error programs are written in Python 3.6/3.7 which means the earlier versions are so much fun :(
and downloading them is recommended if you're interested in Errology.