ExceptionDetails.fromJson constructor

ExceptionDetails.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ExceptionDetails.fromJson(Map<String, dynamic> json) {
  return ExceptionDetails(
    exceptionId: json['exceptionId'] as int,
    text: json['text'] as String,
    lineNumber: json['lineNumber'] as int,
    columnNumber: json['columnNumber'] as int,
    scriptId: json.containsKey('scriptId')
        ? ScriptId.fromJson(json['scriptId'] as String)
        : null,
    url: json.containsKey('url') ? json['url'] as String : null,
    stackTrace: json.containsKey('stackTrace')
        ? StackTraceData.fromJson(json['stackTrace'] as Map<String, dynamic>)
        : null,
    exception: json.containsKey('exception')
        ? RemoteObject.fromJson(json['exception'] as Map<String, dynamic>)
        : null,
    executionContextId: json.containsKey('executionContextId')
        ? ExecutionContextId.fromJson(json['executionContextId'] as int)
        : null,
    exceptionMetaData: json.containsKey('exceptionMetaData')
        ? json['exceptionMetaData'] as Map<String, dynamic>
        : null,
  );
}