From 4f6cc43cacf05b0860881393facfe74e6ff68962 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Fri, 16 Dec 2022 07:50:07 +0100 Subject: [PATCH] dynamite,nextcloud: Fix enum fromValue exceptions --- packages/dynamite/lib/src/openapi_builder.dart | 2 +- packages/nextcloud/lib/src/nextcloud.openapi.dart | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/dynamite/lib/src/openapi_builder.dart b/packages/dynamite/lib/src/openapi_builder.dart index 6bad8177..85d79701 100644 --- a/packages/dynamite/lib/src/openapi_builder.dart +++ b/packages/dynamite/lib/src/openapi_builder.dart @@ -1548,7 +1548,7 @@ TypeResult resolveType( 'return $identifier.${_toDartName(value.toString())};', ], 'default:', - 'throw Exception(\'Can not parse UserStatusClearAtTime0 from "\$value"\');', + 'throw Exception(\'Can not parse $identifier from "\$value"\');', '}', ].join(), ), diff --git a/packages/nextcloud/lib/src/nextcloud.openapi.dart b/packages/nextcloud/lib/src/nextcloud.openapi.dart index f29b7349..23e6bf99 100644 --- a/packages/nextcloud/lib/src/nextcloud.openapi.dart +++ b/packages/nextcloud/lib/src/nextcloud.openapi.dart @@ -3312,7 +3312,7 @@ enum NotesSettings_NoteMode { case 'preview': return NotesSettings_NoteMode.preview; default: - throw Exception('Can not parse UserStatusClearAtTime0 from "$value"'); + throw Exception('Can not parse NotesSettings_NoteMode from "$value"'); } } } @@ -3949,7 +3949,7 @@ enum UserStatusClearAt_Type { case 'end-of': return UserStatusClearAt_Type.endOf; default: - throw Exception('Can not parse UserStatusClearAtTime0 from "$value"'); + throw Exception('Can not parse UserStatusClearAt_Type from "$value"'); } } } @@ -3969,7 +3969,7 @@ enum UserStatusClearAt_Time0 { case 'week': return UserStatusClearAt_Time0.week; default: - throw Exception('Can not parse UserStatusClearAtTime0 from "$value"'); + throw Exception('Can not parse UserStatusClearAt_Time0 from "$value"'); } } } @@ -4101,7 +4101,7 @@ enum UserStatusType { case 'invisible': return UserStatusType.invisible; default: - throw Exception('Can not parse UserStatusClearAtTime0 from "$value"'); + throw Exception('Can not parse UserStatusType from "$value"'); } } }