This commit is contained in:
Namhyeon Go 2024-08-20 16:03:27 +09:00
parent c497c0fb26
commit 8821eb0ae0
2 changed files with 17 additions and 8 deletions

View File

@ -1,7 +1,7 @@
# welsonjs # welsonjs
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fgnh1201%2Fwelsonjs.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fgnh1201%2Fwelsonjs?ref=badge_shield) [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fgnh1201%2Fwelsonjs.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fgnh1201%2Fwelsonjs?ref=badge_shield)
[![DOI](https://zenodo.org/badge/275600068.svg)](https://zenodo.org/doi/10.5281/zenodo.11382384) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.11382384.svg)](https://doi.org/10.5281/zenodo.11382384)
WelsonJS - Build a Windows app on the Windows built-in JavaScript engine. WelsonJS - Build a Windows app on the Windows built-in JavaScript engine.

View File

@ -23,17 +23,26 @@ namespace WelsonJS.Service
// Read the device ID on this computer // Read the device ID on this computer
deviceId = GetSystemUUID(); deviceId = GetSystemUUID();
this.parent.Log($"Resolved the device ID: {deviceId}");
// Read configuration from settings.ini // Read configuration from settings.ini
try if (!String.IsNullOrEmpty(deviceId))
{ {
serverAddress = this.parent.GetSettingsFileHandler().Read("GRPC_HOST", "Service"); this.parent.Log($"Resolved the device ID: {deviceId}");
try
{
serverAddress = this.parent.GetSettingsFileHandler().Read("GRPC_HOST", "Service");
}
catch (Exception ex)
{
serverAddress = null;
this.parent.Log($"Failed to read the server address: {ex.Message}");
}
} }
catch (Exception ex) else
{ {
serverAddress = null; serverAddress = null;
this.parent.Log($"Failed to read the server address: {ex.Message}"); this.parent.Log($"Failed to resolve the device ID");
} }
// Set the GRPC channel // Set the GRPC channel
@ -61,7 +70,7 @@ namespace WelsonJS.Service
} }
else else
{ {
parent.Log("Not Initializd GRPC channel"); parent.Log("Failed to initalize the GRPC channel");
} }
} }
@ -110,7 +119,7 @@ namespace WelsonJS.Service
parent.Log($"An error occurred while retrieving the system UUID: {ex.Message}"); parent.Log($"An error occurred while retrieving the system UUID: {ex.Message}");
} }
return string.Empty; return null;
} }
} }
} }