mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-10 00:58:43 +08:00
The fork is required as Emscripten produces a .wasm file that the upstream web_ffi can't parse correctly to extract exported symbols.
19 lines
678 B
Dart
Executable File
19 lines
678 B
Dart
Executable File
/// Occures if it's not possible to convert dart types to JavaScript types.
|
|
///
|
|
/// This usually happens if a not allowed type is uses as a [NativeType]'s
|
|
/// type argument, or a not allowed return value of a [NativeFunction] is
|
|
/// used.
|
|
class MarshallingException implements Exception {
|
|
final dynamic message;
|
|
const MarshallingException([this.message]);
|
|
|
|
MarshallingException.noAddress(Object o)
|
|
: this('Expected a address (int) but found ${o.runtimeType}');
|
|
|
|
MarshallingException.typeMissmatch(Type t, Object o)
|
|
: this('Expected a type of $t but object has type ${o.runtimeType}');
|
|
|
|
@override
|
|
String toString() => new Exception(message).toString();
|
|
}
|