Skip to content

Commit

Permalink
Update ExpressionParser.java
Browse files Browse the repository at this point in the history
  • Loading branch information
mysport12 committed Feb 8, 2024
1 parent 6ec4127 commit 3f6ceb5
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.mapbox.maps.extension.style.expressions.generated.Expression;
import com.rnmapbox.rnmbx.utils.Logger;

import java.util.Locale;

import javax.annotation.Nullable;

public class ExpressionParser {
static final String LOG_TAG = "RNMBXMapView";
static final String TYPE_STRING = "string";
static final String TYPE_ARRAY = "array";
static final String TYPE_NUMBER = "number";
Expand All @@ -27,6 +29,7 @@ public class ExpressionParser {
String jsonString = new Gson().toJson(array);
return Expression.fromRaw(jsonString);
} catch (Exception e) {
Logger.e(LOG_TAG, "An error occurred while attempting to parse the expression", ex);
return null;
}
}
Expand Down

0 comments on commit 3f6ceb5

Please sign in to comment.