etaoins / llambda

Scheme R7RS frontend for LLVM
Other
68 stars 6 forks source link

Categorize runtime exceptions #48

Closed etaoins closed 9 years ago

etaoins commented 9 years ago

We only support the exception classes required by R7RS: (file-error?) and (read-error?). This isn't very precise, in particular for functional tests which can currently only assert that any error should occur during a test. We should:

  1. Choose a logical group of error classes and ensure the compile-time exceptions conform to them. Racket seems to distinguish range, syntax, type, arguments and arity errors which could be a good start.
  2. Add our own error classes that are harmonized with the ones in the compiler and add custom classes and predicates for those errors.
  3. Change the functional test framework to recognize the error classes we introduce regardless if they're raised at compile or run time
  4. Evaluate the existing functional tests and use the more specific error expectations where possible