File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed
e2e/system/src/generated/errors Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @codama/renderers-rust ' : patch
3+ ---
4+
5+ add decode-error trait to errors
Original file line number Diff line number Diff line change @@ -44,3 +44,9 @@ impl solana_program::program_error::PrintProgramError for SystemError {
4444 solana_program:: msg!( & self . to_string( ) ) ;
4545 }
4646}
47+
48+ impl < T > solana_program:: decode_error:: DecodeError < T > for SystemError {
49+ fn type_of ( ) -> & ' static str {
50+ "SystemError"
51+ }
52+ }
Original file line number Diff line number Diff line change @@ -20,4 +20,10 @@ impl solana_program::program_error::PrintProgramError for {{ program.name | pasc
2020 }
2121}
2222
23+ impl<T > solana_program::decode_error::DecodeError<T > for {{ program .name | pascalCase }} Error {
24+ fn type_of() -> & 'static str {
25+ "{{ program .name | pascalCase }} Error"
26+ }
27+ }
28+
2329{% endblock %}
You can’t perform that action at this time.
0 commit comments