( )⚙ D10738 errors: create superclass for Abort exception

This is an archive of the discontinued Mercurial Phabricator instance.

errors: create superclass for Abort exception
ClosedPublic

Authored by martinvonz on May 19 2021, 1:47 AM.

Details

Summary

I'd like to let extensions subclass StorageError to define a custom
exit code. However, StorageError does not extend Abort (which is
where the exit code currently lives), and it seems that it's not
supposed to either (StorageError seems to be for lower-level errors
and Abort is for command-level errors). This patch therefore
extracts all the code from Abort into a new Error class, which
I'll soon make StorageError also extend.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

martinvonz created this revision.May 19 2021, 1:47 AM
pulkit accepted this revision.May 20 2021, 4:43 AM
This revision is now accepted and ready to land.May 20 2021, 4:43 AM
pulkit requested changes to this revision.May 20 2021, 4:43 AM
This revision now requires changes to proceed.May 20 2021, 4:43 AM
pulkit accepted this revision.May 20 2021, 4:43 AM
This revision is now accepted and ready to land.May 20 2021, 4:43 AM
This revision was automatically updated to reflect the committed changes.