New Issue: Errors Module: the 'Error' base class

21067, "jeremiah-corrado", "Errors Module: the 'Error' base class", "2022-11-21T17:31:34Z"

Background

The Error class is the base class for all other Error types in Chapel.

It has two initializers and one method:

proc init()
proc init(msg: string)
proc message():string

A variety of error types in the package modules also inherit from Error

Suggestions/Questions

  • Should it also provide a varargs initializer that constructs the message by writing the arguments to a channel and constructing a string:
    proc init(args ...?k)
    
    • The halt, warning, and assert procedures also provide this
  • Should message be a paren-less method?
    • To me, it sounds and feels more like a field than a method (but we still want the ability to override it), so it seems like a perfect candidate to be a parenless method.