Skip to content

Commit

Permalink
fix(category): logging error
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 adad81d commit a05b1c9
Showing 1 changed file with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
import android.os.Build;

import org.flyve.inventory.FILog;
import org.flyve.inventory.FlyveException;

import org.json.JSONObject;
import org.xmlpull.v1.XmlSerializer;

Expand Down Expand Up @@ -133,8 +131,7 @@ public CategoryValue put(String key, CategoryValue value) {
* This is a public function that create a XML node with a XmlSerializer object
* @param serializer object
*/
public void toXML(XmlSerializer serializer) throws FlyveException {

public void toXML(XmlSerializer serializer) {
try {
serializer.startTag(null, mType);

Expand All @@ -146,11 +143,11 @@ public void toXML(XmlSerializer serializer) throws FlyveException {

serializer.endTag(null, mType);
} catch (Exception ex) {
throw new FlyveException(ex.getMessage(), ex.getCause());
FILog.d(ex.getMessage());
}
}

public void toXMLWithoutPrivateData(XmlSerializer serializer) throws FlyveException {
public void toXMLWithoutPrivateData(XmlSerializer serializer) {
try {
serializer.startTag(null, mType);

Expand All @@ -164,14 +161,14 @@ public void toXMLWithoutPrivateData(XmlSerializer serializer) throws FlyveExcept

serializer.endTag(null, mType);
} catch (Exception ex) {
throw new FlyveException(ex.getMessage(), ex.getCause());
FILog.d(ex.getMessage());
}
}

/**
* This is a public function that create a JSON
*/
public JSONObject toJSON() throws FlyveException {
public JSONObject toJSON() {
try {
JSONObject jsonCategories = new JSONObject();
for (Map.Entry<String,CategoryValue> entry : this.entrySet()) {
Expand All @@ -181,11 +178,11 @@ public JSONObject toJSON() throws FlyveException {
return jsonCategories;
} catch ( Exception ex ) {
FILog.e( ex.getMessage() );
throw new FlyveException(ex.getMessage(), ex.getCause());
return new JSONObject();
}
}

public JSONObject toJSONWithoutPrivateData() throws FlyveException {
public JSONObject toJSONWithoutPrivateData() {
try {
JSONObject jsonCategories = new JSONObject();
for (Map.Entry<String,CategoryValue> entry : this.entrySet()) {
Expand All @@ -197,7 +194,7 @@ public JSONObject toJSONWithoutPrivateData() throws FlyveException {
return jsonCategories;
} catch ( Exception ex ) {
FILog.e( ex.getMessage() );
throw new FlyveException(ex.getMessage(), ex.getCause());
return new JSONObject();
}
}
}

0 comments on commit a05b1c9

Please sign in to comment.