1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-15 07:43:50 +00:00

Changed error handling

This commit is contained in:
Bryan Roe
2019-01-11 13:56:10 -08:00
parent 81ef5d4c2e
commit 6bb0a8e7b3

View File

@@ -143,15 +143,45 @@ function SMBiosTables()
});
return;
}
throw (process.platform + ' not supported');
if (callback) { callback.apply(this, [null]); return; } else { return (null); }
};
this.parse = function parse(data) {
var r = {};
r.processorInfo = this.processorInfo(data);
r.memoryInfo = this.memoryInfo(data);
r.systemInfo = this.systemInfo(data);
r.systemSlots = this.systemInfo(data);
r.amtInfo = this.amtInfo(data);
try
{
r.processorInfo = this.processorInfo(data);
}
catch(e)
{
}
try
{
r.memoryInfo = this.memoryInfo(data);
}
catch(e)
{
}
try
{
r.systemInfo = this.systemInfo(data);
}
catch(e)
{
}
try
{
r.systemSlots = this.systemInfo(data);
}
catch(e)
{
}
try
{
r.amtInfo = this.amtInfo(data);
}
catch(e)
{
}
return r;
}
this.processorInfo = function processorInfo(data) {