@@ -16,6 +16,7 @@ import { ThemeTypeSelector } from '../common/theme.js';
16
16
import { ISingleFolderWorkspaceIdentifier , IWorkspaceIdentifier } from '../../workspace/common/workspace.js' ;
17
17
import { coalesce } from '../../../base/common/arrays.js' ;
18
18
import { getAllWindowsExcludingOffscreen } from '../../windows/electron-main/windows.js' ;
19
+ import { ILogService } from '../../log/common/log.js' ;
19
20
20
21
// These default colors match our default themes
21
22
// editor background color ("Dark Modern", etc...)
@@ -83,7 +84,8 @@ export class ThemeMainService extends Disposable implements IThemeMainService {
83
84
84
85
constructor (
85
86
@IStateService private stateService : IStateService ,
86
- @IConfigurationService private configurationService : IConfigurationService
87
+ @IConfigurationService private configurationService : IConfigurationService ,
88
+ @ILogService private logService : ILogService
87
89
) {
88
90
super ( ) ;
89
91
@@ -318,6 +320,16 @@ export class ThemeMainService extends Disposable implements IThemeMainService {
318
320
}
319
321
320
322
getWindowSplash ( workspace : IWorkspaceIdentifier | ISingleFolderWorkspaceIdentifier | undefined ) : IPartsSplash | undefined {
323
+ try {
324
+ return this . doGetWindowSplash ( workspace ) ;
325
+ } catch ( error ) {
326
+ this . logService . error ( '[theme main service] Failed to get window splash' , error ) ;
327
+
328
+ return undefined ;
329
+ }
330
+ }
331
+
332
+ private doGetWindowSplash ( workspace : IWorkspaceIdentifier | ISingleFolderWorkspaceIdentifier | undefined ) : IPartsSplash | undefined {
321
333
const partSplash = this . stateService . getItem < IPartsSplash > ( THEME_WINDOW_SPLASH_KEY ) ;
322
334
if ( ! partSplash ?. layoutInfo ) {
323
335
return partSplash ; // return early: overrides currently only apply to layout info
0 commit comments