@@ -12,19 +12,30 @@ public static bool UseISODateFormat
12
12
{
13
13
get
14
14
{
15
- using ( RegistryKey registryKey = Registry . CurrentUser . CreateSubKey ( "ParquetViewer" ) )
15
+ try
16
16
{
17
- bool value = false ;
18
- bool . TryParse ( registryKey . GetValue ( UseISODateFormatKey ) ? . ToString ( ) , out value ) ;
19
- return value ;
17
+ using ( RegistryKey registryKey = Registry . CurrentUser . CreateSubKey ( "ParquetViewer" ) )
18
+ {
19
+ bool value = false ;
20
+ bool . TryParse ( registryKey . GetValue ( UseISODateFormatKey ) ? . ToString ( ) , out value ) ;
21
+ return value ;
22
+ }
23
+ }
24
+ catch
25
+ {
26
+ return false ;
20
27
}
21
28
}
22
29
set
23
30
{
24
- using ( RegistryKey registryKey = Registry . CurrentUser . CreateSubKey ( "ParquetViewer" ) )
31
+ try
25
32
{
26
- registryKey . SetValue ( UseISODateFormatKey , value . ToString ( ) ) ;
33
+ using ( RegistryKey registryKey = Registry . CurrentUser . CreateSubKey ( "ParquetViewer" ) )
34
+ {
35
+ registryKey . SetValue ( UseISODateFormatKey , value . ToString ( ) ) ;
36
+ }
27
37
}
38
+ catch { }
28
39
}
29
40
}
30
41
@@ -48,10 +59,14 @@ public static bool AlwaysSelectAllFields
48
59
}
49
60
set
50
61
{
51
- using ( RegistryKey registryKey = Registry . CurrentUser . CreateSubKey ( "ParquetViewer" ) )
62
+ try
52
63
{
53
- registryKey . SetValue ( AlwaysSelectAllFieldsKey , value . ToString ( ) ) ;
64
+ using ( RegistryKey registryKey = Registry . CurrentUser . CreateSubKey ( "ParquetViewer" ) )
65
+ {
66
+ registryKey . SetValue ( AlwaysSelectAllFieldsKey , value . ToString ( ) ) ;
67
+ }
54
68
}
69
+ catch { }
55
70
}
56
71
}
57
72
@@ -77,10 +92,14 @@ public static ParquetEngine ReadingEngine
77
92
}
78
93
set
79
94
{
80
- using ( RegistryKey registryKey = Registry . CurrentUser . CreateSubKey ( "ParquetViewer" ) )
95
+ try
81
96
{
82
- registryKey . SetValue ( ParquetReadingEngineKey , value . ToString ( ) ) ;
97
+ using ( RegistryKey registryKey = Registry . CurrentUser . CreateSubKey ( "ParquetViewer" ) )
98
+ {
99
+ registryKey . SetValue ( ParquetReadingEngineKey , value . ToString ( ) ) ;
100
+ }
83
101
}
102
+ catch { }
84
103
}
85
104
}
86
105
}
0 commit comments