ProgramError class
Error from a user-defined program
Constructors
-
ProgramError({required int code, required String msg, List<
String> ? logs}) - Create ProgramError with code, message and optional logs
-
ProgramError.fromJson(Map<
String, dynamic> json) -
Create from JSON representation
factory
Properties
- code → int
-
Error code number
final
- hashCode → int
-
The hash code for this object.
no setteroverride
-
logs
→ List<
String> ? -
Transaction logs (optional)
final
- message → String
-
Get error message (alias for compatibility with TypeScript API)
no setter
- msg → String
-
Error message
final
- program → PublicKey?
-
Get the program that threw the error (last in stack)
no setter
-
programErrorStack
→ List<
PublicKey> ? -
Get the complete program error stack
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stackTrace → StackTrace?
-
The stack trace at the point where this error was first thrown.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDetailedString(
) → String - Get detailed error information as string
-
toJson(
) → Map< String, dynamic> - Convert to JSON representation
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
parse(
dynamic err, Map< int, String> idlErrors) → ProgramError? - Parse ProgramError from error object and IDL errors