You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Tweak loading text layout
* Prevent icons and actions from getting squashed/pushed out of view
* Improve disabled ListItem handling
* Add project context to exception messages
Copy file name to clipboardExpand all lines: backend/FwLite/LcmCrdt/CurrentProjectService.cs
+7-4
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,8 @@ public class CurrentProjectService(IServiceProvider services, IMemoryCache memor
13
13
publicCrdtProject?MaybeProject=>_project;
14
14
15
15
//only works because PopulateProjectDataCache is called first in the request pipeline
16
-
publicProjectDataProjectData=>memoryCache.Get<ProjectData>(CacheKey(Project))??thrownewInvalidOperationException("Project data not found, call PopulateProjectDataCache first or use GetProjectData");
if(resultisnull)thrownewInvalidOperationException("Project data not found");
27
+
if(resultisnull)thrownewInvalidOperationException($"Project data not found for project {MaybeProject?.Name}");
27
28
28
29
returnresult;
29
30
}
30
31
31
32
publicvoidValidateProjectScope()
32
33
{
33
-
if(Projectisnull)thrownewInvalidOperationException($"Project is null, there's a bug and {nameof(SetupProjectContext)} was not called");
34
+
if(Projectisnull)
35
+
thrownewInvalidOperationException($"Project is null for project {MaybeProject?.Name}, there's a bug and {nameof(SetupProjectContext)} was not called");
34
36
}
35
37
36
38
privatestaticstringCacheKey(CrdtProjectproject)
@@ -60,7 +62,8 @@ public async ValueTask<ProjectData> SetupProjectContext(CrdtProject project)
0 commit comments