Implemented error reporting solution

This commit is contained in:
Anton Stubenbord
2022-11-14 00:08:07 +01:00
parent b5aac36b2b
commit 511f8ca3f4
33 changed files with 475 additions and 110 deletions

View File

@@ -38,8 +38,8 @@ class EditCorrespondentPage extends StatelessWidget {
);
}
Navigator.pop(context);
} on ErrorMessage catch (error) {
showError(context, error);
} on ErrorMessage catch (error, stackTrace) {
showError(context, error, stackTrace);
}
}
}

View File

@@ -59,8 +59,8 @@ class CorrespondentWidget extends StatelessWidget {
);
}
afterSelected?.call();
} on ErrorMessage catch (error) {
showError(context, error);
} on ErrorMessage catch (error, stackTrace) {
showError(context, error, stackTrace);
}
}
}

View File

@@ -54,8 +54,8 @@ class DocumentTypeWidget extends StatelessWidget {
);
}
afterSelected?.call();
} on ErrorMessage catch (error) {
showError(context, error);
} on ErrorMessage catch (error, stackTrace) {
showError(context, error, stackTrace);
}
}
}

View File

@@ -43,8 +43,8 @@ class EditStoragePathPage extends StatelessWidget {
);
}
Navigator.pop(context);
} on ErrorMessage catch (error) {
showError(context, error);
} on ErrorMessage catch (error, stackTrace) {
showError(context, error, stackTrace);
}
}
}

View File

@@ -58,8 +58,8 @@ class StoragePathWidget extends StatelessWidget {
);
}
afterSelected?.call();
} on ErrorMessage catch (error) {
showError(context, error);
} on ErrorMessage catch (error, stackTrace) {
showError(context, error, stackTrace);
}
}
}

View File

@@ -57,8 +57,8 @@ class EditTagPage extends StatelessWidget {
}
cubit.updateFilter(filter: updatedFilter);
Navigator.pop(context);
} on ErrorMessage catch (error) {
showError(context, error);
} on ErrorMessage catch (error, stackTrace) {
showError(context, error, stackTrace);
}
}
}

View File

@@ -28,6 +28,7 @@ class TagWidget extends StatelessWidget {
tag.name,
style: TextStyle(color: tag.textColor),
),
checkmarkColor: tag.textColor,
backgroundColor: tag.color,
side: BorderSide.none,
);
@@ -57,8 +58,8 @@ class TagWidget extends StatelessWidget {
if (afterTagTapped != null) {
afterTagTapped!();
}
} on ErrorMessage catch (error) {
showError(context, error);
} on ErrorMessage catch (error, stackTrace) {
showError(context, error, stackTrace);
}
}
}

View File

@@ -146,8 +146,8 @@ class _EditLabelPageState<T extends Label> extends State<EditLabelPage<T>> {
Navigator.pop(context);
} on PaperlessValidationErrors catch (errorMessages) {
setState(() => _errors = errorMessages);
} on ErrorMessage catch (error) {
showError(context, error);
} on ErrorMessage catch (error, stackTrace) {
showError(context, error, stackTrace);
}
}
}