ActorCallError constructor

ActorCallError(
  1. Principal canisterId,
  2. String methodName,
  3. String type,
  4. Map<String, String> props,
)

Implementation

ActorCallError(
  Principal canisterId,
  String methodName,
  String type, //: 'query' | 'update'
  Map<String, String> props,
) {
  final e = [
    'Call failed:',
    '  Canister: ${canisterId.toText()}',
    '  Method: $methodName ($type)',
    ...props.entries.map(
      (n) => "  '${n.key}': ${jsonEncode(props[n.value])}",
    ),
  ].join('\n');
  throw e;
}