File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -2711,7 +2711,8 @@ namespace WPEFramework {
2711
2711
bool SystemServices::readTerritoryFromFile ()
2712
2712
{
2713
2713
bool retValue = true ;
2714
- if (Utils::fileExists (TERRITORYFILE)){
2714
+ try {
2715
+ if (Utils::fileExists (TERRITORYFILE)){
2715
2716
ifstream inFile (TERRITORYFILE);
2716
2717
string str;
2717
2718
getline (inFile, str);
@@ -2744,9 +2745,16 @@ namespace WPEFramework {
2744
2745
}
2745
2746
inFile.close ();
2746
2747
2747
- }else {
2748
- LOGERR (" Territory is not set" );
2749
- }
2748
+ }else {
2749
+ LOGERR (" Territory is not set" );
2750
+ }
2751
+ }
2752
+ catch (...){
2753
+ LOGERR (" Exception caught while reading territory file" );
2754
+ retValue = false ;
2755
+ m_strTerritory = " " ;
2756
+ m_strRegion = " " ;
2757
+ }
2750
2758
return retValue;
2751
2759
}
2752
2760
You can’t perform that action at this time.
0 commit comments