Skip to content

Implement more specific exceptions, add support for most Lin/Tartar-related exceptions in VM. #15

@NotJustAnna

Description

@NotJustAnna

Currently:

  • A lot of IllegalStateExceptions/IllegalArgumentExceptions/RuntimeExceptions are used, even if discretely.
    • Look up usages of functions check, error and removeLast.
    • There's even a AssertionError used once, at the ObjectParser.
  • There are a lot of TODOs() which generate NotImplementedErrors.
  • Tartar infamously use a lot of require, IllegalStateExceptions and IllegalArgumentExceptions.
  • Most Kotlin-land Exceptions are turned to "nativeExceptions" at VM and lose most of its data.
    • Even the complete native stacktrace is usually lost.

TO-DO list:

  • Find and replace usages of IllegalStateExceptions/IllegalArgumentExceptions/RuntimeExceptions/check/error/AssertionError with better, more specific exceptions which implement LinNativeException.
    • Open issue on Tartar to do the same when possible. Done.
  • If possible, replace TODOs() with exceptions that explain that such an operation is illegal.
  • Add the complete native stacktrace to the "nativeExceptions" to help with debugging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions