ProductionUiCordonel: - error messages extended
This commit is contained in:
@@ -14,4 +14,4 @@ using System.Reflection;
|
|||||||
//[assembly: AssemblyVersion("1.2.*.0")]
|
//[assembly: AssemblyVersion("1.2.*.0")]
|
||||||
|
|
||||||
|
|
||||||
[assembly: AssemblyVersion("2.6.13.*")]
|
[assembly: AssemblyVersion("2.6.14.*")]
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ using Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.EventArguments;
|
|||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.Consts;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.Consts;
|
||||||
|
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.Properties;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisPwd;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisPwd;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts;
|
||||||
@@ -510,14 +511,15 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
|
|||||||
nameof(Genesis), configFile);
|
nameof(Genesis), configFile);
|
||||||
if (!new FileInfo(configFilePath).Exists)
|
if (!new FileInfo(configFilePath).Exists)
|
||||||
{
|
{
|
||||||
Logger.Fatal($"Slot:{Slot} - Missing register definition file (configuration.json). Search location: {configFilePath}");
|
var msg = $"Slot:{Slot} - {Resources.StrErrorMissingConfiguration} {location}";
|
||||||
throw new ApplicationException("Missing register definition file (configuration.json). Setup is invalid!");
|
Logger.Fatal($"Slot:{Slot} - Missing register definition file (configuration.json). Search location: {location}");
|
||||||
|
throw new ApplicationException(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Logger.Trace($"Slot:{Slot} - Registers definitions loaded from {configFilePath}");
|
Logger.Trace($"Slot:{Slot} - Registers definitions loaded from {location}");
|
||||||
if (Configuration.AutoUpdateFiles)
|
if (Configuration.AutoUpdateFiles)
|
||||||
{
|
{
|
||||||
Logger.Trace($"Slot:{Slot} - Check for updates of {configFilePath}");
|
Logger.Trace($"Slot:{Slot} - Check for updates of {configFilePath}");
|
||||||
@@ -815,9 +817,9 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
throw new ApplicationException("Cannot Open Comport. Check TaskManager for other Genesis " +
|
var msg = $"Slot:{Slot} - {Resources.StrErrorMsgComPort} { ex.Message}";
|
||||||
"relevant programs and close them. " +
|
Logger.Fatal(msg);
|
||||||
$"Also check if the comport is valid! { Environment.NewLine }{ ex.Message}");
|
throw new ApplicationException(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
protocol.OnRecordReadyToSend += delegate (Object o, BasePortDataEventArgs dataToSend)
|
protocol.OnRecordReadyToSend += delegate (Object o, BasePortDataEventArgs dataToSend)
|
||||||
|
|||||||
+18
@@ -60,6 +60,24 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to ERROR: Missing or invalid register definition (configuration.json)! Search in:.
|
||||||
|
/// </summary>
|
||||||
|
internal static string StrErrorMissingConfiguration {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("StrErrorMissingConfiguration", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Cannot Open Comport. Check TaskManager for other Genesis relevant programs and close them! Also check if the comport is valid!.
|
||||||
|
/// </summary>
|
||||||
|
internal static string StrErrorMsgComPort {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("StrErrorMsgComPort", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to ERROR: Could not find a CSD parameter in register list!.
|
/// Looks up a localized string similar to ERROR: Could not find a CSD parameter in register list!.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -186,4 +186,10 @@
|
|||||||
<data name="StrErrorMsgRegisterWrite" xml:space="preserve">
|
<data name="StrErrorMsgRegisterWrite" xml:space="preserve">
|
||||||
<value>FEHLER: Register konnte nicht geschrieben werden!</value>
|
<value>FEHLER: Register konnte nicht geschrieben werden!</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="StrErrorMissingConfiguration" xml:space="preserve">
|
||||||
|
<value>FEHLER: Konfigurationsdatei (configuration.json) nicht gefunden oder ungültig! Erwartetes Verzeichnis:</value>
|
||||||
|
</data>
|
||||||
|
<data name="StrErrorMsgComPort" xml:space="preserve">
|
||||||
|
<value>Kommunikationsanschluß nicht vorhanden oder von anderer Genesis App blockiert! Bitte TaskManger starten und prüfen!</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -186,4 +186,10 @@
|
|||||||
<data name="StrErrorMsgRegisterWrite" xml:space="preserve">
|
<data name="StrErrorMsgRegisterWrite" xml:space="preserve">
|
||||||
<value>ERROR: Could not write register!</value>
|
<value>ERROR: Could not write register!</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="StrErrorMissingConfiguration" xml:space="preserve">
|
||||||
|
<value>ERROR: Missing or invalid register definition (configuration.json)! Search in:</value>
|
||||||
|
</data>
|
||||||
|
<data name="StrErrorMsgComPort" xml:space="preserve">
|
||||||
|
<value>Cannot Open Comport. Check TaskManager for other Genesis relevant programs and close them! Also check if the comport is valid!</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
+1
-1
Submodule Common/LaaPackages updated: ce1dc26047...e7aa3e2723
@@ -82,7 +82,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
msg = Properties.Resources.StrErrorMsgMissingNetworkConnetction + "\n" + e.Message ;
|
msg = Properties.Resources.StrErrorMsgMissingNetworkConnetction + " " + e.Message ;
|
||||||
_logger.Error(msg);
|
_logger.Error(msg);
|
||||||
MessageBox.Show(msg,
|
MessageBox.Show(msg,
|
||||||
Properties.Resources.StrProcessStateError,
|
Properties.Resources.StrProcessStateError,
|
||||||
@@ -93,7 +93,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel
|
|||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
// Log version to files for debug purposes
|
// Log version to files for debug purposes
|
||||||
_strSoftwareNameVersion = $"{Properties.Resources.StrSoftwareNameVersion}{_version}";
|
_strSoftwareNameVersion = $"{Properties.Resources.StrSoftwareNameVersion} {_version}";
|
||||||
_logger.Info(_strSoftwareNameVersion);
|
_logger.Info(_strSoftwareNameVersion);
|
||||||
|
|
||||||
Title = _strSoftwareNameVersion;
|
Title = _strSoftwareNameVersion;
|
||||||
@@ -181,12 +181,11 @@ namespace Xylem.Common.Production.ProductionUiCordonel
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
var msg = Properties.Resources.StrErrorMsgMissingComPort + $"\nSlot:{Slot}";
|
_logger.Error(ex.Message);
|
||||||
_logger.Error(msg);
|
MessageBox.Show(ex.Message,
|
||||||
MessageBox.Show(msg,
|
|
||||||
Properties.Resources.StrProcessStateError,
|
Properties.Resources.StrProcessStateError,
|
||||||
MessageBoxButton.OK, MessageBoxImage.Error);
|
MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
throw new ApplicationException(msg + $"\n{ex.Message}");
|
throw new ApplicationException(ex.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
//install the process changed event handler for single processes
|
//install the process changed event handler for single processes
|
||||||
|
|||||||
Submodule
+1
Submodule LaaProductionWeb/LaaPackages added at e7aa3e2723
Reference in New Issue
Block a user