Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
🎨 improved error message
  • Loading branch information
sarbagyastha committed Jan 5, 2023
commit 889222ee436a778845d8267ae392ecb6134390c9
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ extension InputFilterMapExtension<E extends Entity> on InputFilterMap<E> {

if (processor == null) {
throw StateError(
'Input filter not defined for "$I".\n'
'\n\nInput filter not defined for "$I".\n'
'Filters available for: ${keys.isEmpty ? 'none' : keys.join(', ')}\n'
'Dependency: $E',
'Dependency: $E\n\n',
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ extension OutputFilterMapExtension<E extends Entity> on OutputFilterMap<E> {

if (builder == null) {
throw StateError(
'Output filter not defined for "$O".\n'
'\n\nOutput filter not defined for "$O".\n'
'Filters available for: ${keys.isEmpty ? 'none' : keys.join(', ')}\n'
'Dependency: $E',
'Dependency: $E\n\n',
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,27 @@ extension RequestSubscriptionMapExtension<I extends Input>

if (subscription == null) {
throw StateError(
'\n\nNo subscription for "$O" exists.\n'
'Please ensure that the gateway that belongs to "$O" is attached '
'\n\nNo subscription for "$O" exists.\n\n'
'Please follow the steps below in order to fix this issue:\n'
'1. Ensure that the use case that requests "$O" is attached '
'the appropriate gateway.\n'
' AppropriateGatewayProvider(\n'
' ...,\n'
' useCases: [<<useCaseProvider>>],\n'
' )\n'
'2. Ensure that the gateway that belongs to "$O" is attached '
'the appropriate external interface.\n'
'Also, ensure that the associated external interface is initialized.\n'
'\nExternal Interfaces can be initialized '
'by either calling initializeFor() in its provider, or by adding '
'the provider to AppProviderScope.\n',
' AppropriateExternalInterfaceProvider(\n'
' ...,\n'
' gateways: [<<gatewayProvider>>],\n'
' )\n'
'3. Ensure that the associated external interface is initialized.\n'
' AppProviderScope(\n'
' ...,\n'
' externalInterfaceProviders: [\n'
' <<associatedExternalInterfaceProvider>>,\n'
' ],\n'
' )\n',
);
}

Expand Down