You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
@tmcw Yeah can we support this, I have tried to do it before on Java but was getting too complicated.
Also we need a way to return an error back via JNI instead of normal C++ exception which just crashes the app on Java with no way to provide a useful error message to developers.
Something like a isStyleUrlValid() function, or even some sort of bool or otherwise return from setStyleUrl(). Then we can throw on Java a helpfully named exception like InvalidStyleUrlException
Another alternative is to generate a failedToLoad event (see #630 and #2263)
@jfirebaugh what is your preference about sending the URL validation result back to Java?
Activity
ljbade commentedon Oct 22, 2015
@tmcw Yeah can we support this, I have tried to do it before on Java but was getting too complicated.
Also we need a way to return an error back via JNI instead of normal C++ exception which just crashes the app on Java with no way to provide a useful error message to developers.
Something like a
isStyleUrlValid()function, or even some sort ofboolor otherwise return fromsetStyleUrl(). Then we can throw on Java a helpfully named exception likeInvalidStyleUrlExceptionAnother alternative is to generate a
failedToLoadevent (see #630 and #2263)@jfirebaugh what is your preference about sending the URL validation result back to Java?
ljbade commentedon Oct 22, 2015
/cc @bleege @tobrun
jfirebaugh commentedon Oct 22, 2015
The first step is to make this not crash: if the result from
getMapboxURLPathname()has less segments than expected,return url.Later we can add validation and diagnostic messages. These should probably happen at style parse time, with the rest of the validations.
1ec5 commentedon Oct 26, 2015
→ #2804
[core] Ensure URL normalization is safe. Fixes mapbox#2695