mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-16 16:23:25 +00:00
Changed error handling
This commit is contained in:
@@ -143,15 +143,45 @@ function SMBiosTables()
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
throw (process.platform + ' not supported');
|
if (callback) { callback.apply(this, [null]); return; } else { return (null); }
|
||||||
};
|
};
|
||||||
this.parse = function parse(data) {
|
this.parse = function parse(data) {
|
||||||
var r = {};
|
var r = {};
|
||||||
|
try
|
||||||
|
{
|
||||||
r.processorInfo = this.processorInfo(data);
|
r.processorInfo = this.processorInfo(data);
|
||||||
|
}
|
||||||
|
catch(e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
r.memoryInfo = this.memoryInfo(data);
|
r.memoryInfo = this.memoryInfo(data);
|
||||||
|
}
|
||||||
|
catch(e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
r.systemInfo = this.systemInfo(data);
|
r.systemInfo = this.systemInfo(data);
|
||||||
|
}
|
||||||
|
catch(e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
r.systemSlots = this.systemInfo(data);
|
r.systemSlots = this.systemInfo(data);
|
||||||
|
}
|
||||||
|
catch(e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
r.amtInfo = this.amtInfo(data);
|
r.amtInfo = this.amtInfo(data);
|
||||||
|
}
|
||||||
|
catch(e)
|
||||||
|
{
|
||||||
|
}
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
this.processorInfo = function processorInfo(data) {
|
this.processorInfo = function processorInfo(data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user