RequestFormatException.fromMap constructor
RequestFormatException.fromMap(
- Map<String, dynamic> map
)
Implementation
factory RequestFormatException.fromMap(Map<String, dynamic> map){
if(map['errCode'] == null
|| map['errCode'] is! int
|| map['errCode'] != InteractivePlusSystemExceptionType.REQUEST_FORMAT_EXCEPTION.errCode
){
throw InteractivePlusSystemException.SERIALIZATION_EXCEPTION;
}
String Function([String? locale])? errMessageDecoded;
if(map['errMessage'] != null && map['errMessage'] is String){
errMessageDecoded = ([locale]) => map['errMessage'];
}
MultipleItemRelatedParams? errParamDecoded;
if(map['errParams'] != null && map['errParams'] is Map<String,dynamic>){
try{
errParamDecoded = MultipleItemRelatedParams.fromMap(map['errParams']);
}catch(e){
errParamDecoded = null;
}
}
return RequestFormatException(errMessageDecoded,errParamDecoded);
}