Skip to content

[DSP-86] Make old code compatible with new errors

Konstantin Ivanov requested to merge martoon/dsp86-non-breaking-errors into master

Description

Problem: after adding mandatory ErrorHasDoc instances old code which declared errors as datatypes does not work anymore.

Solution: add stub instance of ErrorHasDoc to deriveCustomError.

Old approach to errors does not support proper documentation and is not going to, so this solution seems fine.

Related issue(s)

https://issues.serokell.io/issue/DSP-86

Checklist for your Merge Request

Related changes (conditional)

  • Tests (see short guidelines)

    • If I added new functionality, I added tests covering it.
    • If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
  • Documentation

    • I checked whether I should update the docs and did so if necessary:

Stylistic guide (mandatory)

Edited by Konstantin Ivanov

Merge request reports