This repository was archived by the owner on Apr 23, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Samples/IoTCoreDefaultApp/CS/IoTCoreDefaultApp Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -314,12 +314,14 @@ private void SetLanguageEntites(string languageTag)
314
314
} ) ;
315
315
316
316
}
317
- catch ( InvalidCastException )
317
+ catch ( UnauthorizedAccessException ex )
318
318
{
319
- // This is indicitive of EmbeddedMode not being enabled (i.e.
319
+ // This is indicative of EmbeddedMode not being enabled (i.e.
320
320
// running IotCoreDefaultApp on Desktop or Mobile without
321
321
// enabling EmbeddedMode)
322
322
// https://developer.microsoft.com/en-us/windows/iot/docs/embeddedmode
323
+ Log . Write ( ex . ToString ( ) ) ;
324
+ Log . Write ( "UnauthorizedAccessException: Check to see if Embedded Mode is enabled" ) ;
323
325
}
324
326
}
325
327
Original file line number Diff line number Diff line change 1
1
// Copyright (c) Microsoft. All rights reserved.
2
2
3
+ using IoTCoreDefaultApp . Utils ;
3
4
using System ;
4
5
using System . Collections . Generic ;
5
6
using System . Linq ;
@@ -42,12 +43,14 @@ public static bool IsCortanaSupported()
42
43
{
43
44
isCortanaSupported = CortanaSettings . IsSupported ( ) ;
44
45
}
45
- catch ( UnauthorizedAccessException )
46
+ catch ( UnauthorizedAccessException ex )
46
47
{
47
48
// This is indicitive of EmbeddedMode not being enabled (i.e.
48
49
// running IotCoreDefaultApp on Desktop or Mobile without
49
50
// enabling EmbeddedMode)
50
51
// https://developer.microsoft.com/en-us/windows/iot/docs/embeddedmode
52
+ Log . Write ( ex . ToString ( ) ) ;
53
+ Log . Write ( "UnauthorizedAccessException: Check to see if Embedded Mode is enabled" ) ;
51
54
}
52
55
53
56
return isCortanaSupported ;
You can’t perform that action at this time.
0 commit comments