config: create initial config when exception happens
This commit is contained in:
parent
e5948745ee
commit
8ba23a6d11
|
@ -67,7 +67,10 @@ namespace SparkleLib {
|
||||||
try {
|
try {
|
||||||
Load (FullPath);
|
Load (FullPath);
|
||||||
|
|
||||||
} catch (FileNotFoundException) {
|
} catch (TypeInitializationException) {
|
||||||
|
CreateInitialConfig ();
|
||||||
|
|
||||||
|
} catch (FileException) {
|
||||||
CreateInitialConfig ();
|
CreateInitialConfig ();
|
||||||
|
|
||||||
} catch (XmlException) {
|
} catch (XmlException) {
|
||||||
|
@ -79,7 +82,7 @@ namespace SparkleLib {
|
||||||
CreateInitialConfig ();
|
CreateInitialConfig ();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
throw new XmlException (FullPath + " does not contain a valid SparkleShare XML tree.");
|
throw new XmlException (FullPath + " does not contain a valid SparkleShare XML structure.");
|
||||||
}
|
}
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
|
|
Loading…
Reference in a new issue