Skip to content

Commit

Permalink
fix(hardware): manage exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelje authored and Hector Rondon committed Jan 18, 2018
1 parent 3056820 commit a6097d9
Showing 1 changed file with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,28 +104,29 @@ public Hardware(Context xCtx) {
super(xCtx);

this.xCtx = xCtx;
props = System.getProperties();
Memory memory = new Memory(xCtx);

Category c = new Category("HARDWARE", "hardware");
try {
props = System.getProperties();
Memory memory = new Memory(xCtx);

c.put("DATELASTLOGGEDUSER", new CategoryValue(getDatelastloggeduser(), "DATELASTLOGGEDUSER", "dateLastLoggedUser") );
c.put("LASTLOGGEDUSER", new CategoryValue(getLastloggeduser(), "LASTLOGGEDUSER", "lastLoggedUser"));
c.put("NAME", new CategoryValue(getName(), "NAME", "name"));
c.put("OSNAME", new CategoryValue(OSNAME, "OSNAME", "osName"));
c.put("OSVERSION", new CategoryValue(getOsversion(), "OSVERSION", "osVersion"));
c.put("ARCHNAME", new CategoryValue(getArchname(), "ARCHNAME", "archName"));
c.put("UUID", new CategoryValue(getUUID(), "UUID", "uuid"));
Category c = new Category("HARDWARE", "hardware");

String vMemory = "";
try {
vMemory = memory.getCapacity();
c.put("DATELASTLOGGEDUSER", new CategoryValue(getDatelastloggeduser(), "DATELASTLOGGEDUSER", "dateLastLoggedUser"));
c.put("LASTLOGGEDUSER", new CategoryValue(getLastloggeduser(), "LASTLOGGEDUSER", "lastLoggedUser"));
c.put("NAME", new CategoryValue(getName(), "NAME", "name"));
c.put("OSNAME", new CategoryValue(OSNAME, "OSNAME", "osName"));
c.put("OSVERSION", new CategoryValue(getOsversion(), "OSVERSION", "osVersion"));
c.put("ARCHNAME", new CategoryValue(getArchname(), "ARCHNAME", "archName"));
c.put("UUID", new CategoryValue(getUUID(), "UUID", "uuid"));

String vMemory = memory.getCapacity();

c.put("MEMORY", new CategoryValue(vMemory, "MEMORY", "memory"));

this.add(c);
} catch (Exception ex) {
FILog.e(ex.getMessage());
}
c.put("MEMORY", new CategoryValue(vMemory, "MEMORY", "memory"));

this.add(c);

}

Expand Down

0 comments on commit a6097d9

Please sign in to comment.