Split out runtime_error and add documentation.
Automatically indent function documentation.