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
refactor: Use shared constants and add error handling for Analytics DLL copy
This commit addresses feedback from the previous review:
- Created `FirebaseAnalyticsEditorConstants.cs` to store shared constants for:
- `DllName` ("analytics_win.dll")
- `DllSourcePath` ("./analytics_win.dll")
- `AnalyticsTypeFullName` ("Firebase.Analytics.FirebaseAnalytics, Firebase.Analytics")
- Updated `editor/app/src/DllLocationPatcher.cs`:
- Replaced hardcoded strings with the new shared constants.
- Wrapped file I/O operations (directory creation and DLL copy for Windows builds) in a try-catch block to handle potential exceptions (e.g., IOExceptions, UnauthorizedAccessException) and log specific errors.
- Updated `editor/app/src/AnalyticsPlayModeSetup.cs`:
- Replaced hardcoded strings and local constants with the new shared constants.
- Wrapped file I/O operations (directory creation and DLL copy for Play Mode) in a try-catch block to handle potential exceptions and log specific errors.
These changes improve maintainability by centralizing critical strings and enhance robustness by ensuring that file operation errors during build post-processing or Play Mode setup are caught and logged gracefully.
0 commit comments