Skip to content
Unverified Commit 02284a3e authored by Dónal Murray's avatar Dónal Murray Committed by GitHub
Browse files

Add custom error message for `StorageNoopGuard` (#1727)



Expand `StorageNoopGuard` to be able to add extra context through a
custom error message. When the guard is triggered it panics with an
error message which can be defaulted, set on construction, or set after
it has been constructed.

Turn `StorageNoopGuard` into struct with `storage_root` and
`error_message` and added `from_error_message` constructor and
`set_error_message` setter.

Also added `new()` aliased to `default()`.

Closes #375

---------

Co-authored-by: default avatarjoe petrowski <[email protected]>
Co-authored-by: default avatarLiam Aharon <[email protected]>
parent ec9274ee
Pipeline #395095 canceled with stages
in 4 minutes and 46 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment