diff --git a/README.md b/README.md index e5e9996..de9a52e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # 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) -[![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. diff --git a/WelsonJS.Toolkit/WelsonJS.Service/MessageReceiver.cs b/WelsonJS.Toolkit/WelsonJS.Service/MessageReceiver.cs index 0a3e404..3b7b795 100644 --- a/WelsonJS.Toolkit/WelsonJS.Service/MessageReceiver.cs +++ b/WelsonJS.Toolkit/WelsonJS.Service/MessageReceiver.cs @@ -23,17 +23,26 @@ namespace WelsonJS.Service // Read the device ID on this computer deviceId = GetSystemUUID(); - this.parent.Log($"Resolved the device ID: {deviceId}"); // 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; - this.parent.Log($"Failed to read the server address: {ex.Message}"); + this.parent.Log($"Failed to resolve the device ID"); } // Set the GRPC channel @@ -61,7 +70,7 @@ namespace WelsonJS.Service } 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}"); } - return string.Empty; + return null; } } }