Skip to content

Add devdocs describing GR_INTERNAL_(ERROR|REQUIRE), GrPrintAndReturnErr, & GrPrintErrMsg #359

@mabruzzo

Description

@mabruzzo

Just as Britton recommended in #269, and as the title says, we should add some brief developer documents describing GR_INTERNAL_ERROR, GR_INTERNAL_REQUIRE, GrPrintAndReturnErr, & GrPrintErrMsg

In short:

  • GR_INTERNAL_ERROR & GR_INTERNAL_REQUIRE will abort the program with an error message. They should be used in 2 contexts:
    1. in cases where Grackle has gotten into a really bad state that we can't explain and can't recover from (and probably means that all results are invalid). These cases should be extremely rare.
    2. When developing new experimental features, these can be extremely useful for documenting certain scenarios that we haven't handled yet
  • GrPrintErrMsg provides a nicely printed error-message (it includes the line and file that the message was printed from)
  • GrPrintAndReturnErr does the same thing as GrPrintErrMsg and returns a failing exit-code (this idiom comes up a lot in Grackle)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions