GenericException constructor
Implementation
GenericException(
{String? message, Exception? causeException, Error? causeError}) {
if (TextUtils.isEmpty(message)) {
try {
if (causeException != null) {
int indexOfColon = causeException.toString().indexOf(':');
if (indexOfColon != -1) {
message =
causeException.toString().substring(indexOfColon + 1).trim();
}
}
} catch (e) {
print(e);
}
}
if (TextUtils.isEmpty(message)) {
if (causeError != null) message = causeError.toString();
}
if (TextUtils.isEmpty(message)) message = '';
_causeException = causeException;
_causeError = causeError;
_message = message;
}