Standardize print error
This commit is contained in:
parent
0d85482136
commit
bcf3d65522
|
|
@ -825,7 +825,7 @@ abstract class SettingsEntity
|
|||
case EntityType.credit:
|
||||
return defaultCreditTerms;
|
||||
default:
|
||||
print('## Error: getDefaultTerms not defined for $entityType');
|
||||
print('## ERROR: getDefaultTerms not defined for $entityType');
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
|
@ -840,7 +840,7 @@ abstract class SettingsEntity
|
|||
case EntityType.credit:
|
||||
return defaultCreditFooter;
|
||||
default:
|
||||
print('## Error: getDefaultFooter not defined for $entityType');
|
||||
print('## ERROR: getDefaultFooter not defined for $entityType');
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ Future<AppState> _initialState(bool isTesting) async {
|
|||
if (kIsWeb) {
|
||||
reportErrors = WebUtils.getHtmlValue('report-errors') == '1';
|
||||
if (reportErrors) {
|
||||
print('Error reporting is enabled');
|
||||
print('## ERROR reporting is enabled');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ Middleware<AppState> _createLoadState(
|
|||
throw 'Unknown page: ${uiState.currentRoute}';
|
||||
}
|
||||
} catch (error) {
|
||||
print('Error (app_middleware - load state): $error');
|
||||
print('## ERROR (app_middleware - load state): $error');
|
||||
|
||||
if (!kIsWeb && !await NetworkUtils.isOnline()) {
|
||||
showMessageDialog(
|
||||
|
|
@ -304,7 +304,7 @@ Middleware<AppState> _createLoadState(
|
|||
}
|
||||
AppBuilder.of(action.context).rebuild();
|
||||
}).catchError((Object error) {
|
||||
print('Error (app_middleware - refresh): $error');
|
||||
print('## ERROR (app_middleware - refresh): $error');
|
||||
store.dispatch(UserLogout());
|
||||
});
|
||||
store.dispatch(RefreshData(completer: completer, clearData: true));
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ abstract class AppState implements Built<AppState, AppStateBuilder> {
|
|||
case EntityType.settings:
|
||||
return null;
|
||||
default:
|
||||
print('Error: getEntityMap $type not found');
|
||||
print('## ERROR: getEntityMap $type not found');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ String getDesignIdForClientByEntity(
|
|||
case EntityType.credit:
|
||||
return settings.defaultCreditDesignId;
|
||||
default:
|
||||
print('## Error: undefined entity type $entityType in design_selectors');
|
||||
print('## ERROR: undefined entity type $entityType in design_selectors');
|
||||
return settings.defaultInvoiceDesignId;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -333,7 +333,7 @@ void handleExpenseCategoryAction(BuildContext context,
|
|||
);
|
||||
break;
|
||||
default:
|
||||
print('Error: unhandled action $action');
|
||||
print('## ERROR: unhandled action $action');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -319,7 +319,7 @@ void handleSubscriptionAction(
|
|||
);
|
||||
break;
|
||||
default:
|
||||
print('Error: unhandled action $action in subscription_actions');
|
||||
print('## ERROR: unhandled action $action in subscription_actions');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ void handleTaskStatusAction(
|
|||
);
|
||||
break;
|
||||
default:
|
||||
print('Error: unhandled action $action in task_status_actions');
|
||||
print('## ERROR: unhandled action $action in task_status_actions');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ class _EntityDropdownState extends State<EntityDropdown> {
|
|||
_entityMap = widget.entityMap ?? state.getEntityMap(widget.entityType);
|
||||
|
||||
if (_entityMap == null) {
|
||||
print('ERROR: ENTITY MAP IS NULL: ${widget.entityType}');
|
||||
print('## ERROR: ENTITY MAP IS NULL: ${widget.entityType}');
|
||||
} else {
|
||||
final entity = _entityMap[widget.entityId];
|
||||
if (widget.overrideSuggestedLabel != null) {
|
||||
|
|
@ -110,7 +110,7 @@ class _EntityDropdownState extends State<EntityDropdown> {
|
|||
_entityMap = widget.entityMap ?? state.getEntityMap(widget.entityType);
|
||||
|
||||
if (_entityMap == null) {
|
||||
print('ERROR: ENTITY MAP IS NULL: ${widget.entityType}');
|
||||
print('## ERROR: ENTITY MAP IS NULL: ${widget.entityType}');
|
||||
} else {
|
||||
final entity = _entityMap[widget.entityId];
|
||||
if (widget.overrideSuggestedLabel != null) {
|
||||
|
|
|
|||
|
|
@ -612,7 +612,7 @@ class EntityScreens extends StatelessWidget {
|
|||
listWidget = ExpenseScreenBuilder();
|
||||
break;
|
||||
default:
|
||||
print('Error: list widget not implemented for $entityType');
|
||||
print('## ERROR: list widget not implemented for $entityType');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1170,7 +1170,7 @@ class _ContactUsDialogState extends State<ContactUsDialog> {
|
|||
});
|
||||
Navigator.pop(context);
|
||||
}).catchError((dynamic error) {
|
||||
print('error: $error');
|
||||
print('## ERROR: $error');
|
||||
setState(() => _isSaving = false);
|
||||
showErrorDialog(context: context, message: '$error');
|
||||
});
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Future<Contact> getDeviceContact() async {
|
|||
openAppSettings();
|
||||
}
|
||||
} catch (e) {
|
||||
print('Error: failed to get contact: $e');
|
||||
print('## ERROR: failed to get contact: $e');
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -62403,7 +62403,7 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
|||
key;
|
||||
|
||||
if (value.isEmpty) {
|
||||
print('ERROR: localization key not found - $key');
|
||||
print('## ERROR: localization key not found - $key');
|
||||
|
||||
final englishValue = _localizedValues['en'][lookupKey] ?? '';
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class GoogleOAuth {
|
|||
|
||||
return true;
|
||||
} else {
|
||||
print('## Error: sign in failed');
|
||||
print('## ERROR: sign in failed');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -41,7 +41,7 @@ class GoogleOAuth {
|
|||
|
||||
return true;
|
||||
} else {
|
||||
print('## Error: sign up failed');
|
||||
print('## ERROR: sign up failed');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -62,7 +62,7 @@ class GoogleOAuth {
|
|||
|
||||
return true;
|
||||
} else {
|
||||
print('## Error: grant offline failed');
|
||||
print('## ERROR: grant offline failed');
|
||||
errorCallback();
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ void handleStubAction(
|
|||
);
|
||||
break;
|
||||
default:
|
||||
print('Error: unhandled action $action in stub_actions');
|
||||
print('## ERROR: unhandled action $action in stub_actions');
|
||||
break;
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue