File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 2020
2121import com .google .gson .Gson ;
2222import com .google .gson .GsonBuilder ;
23+ import com .google .gson .JsonSyntaxException ;
2324import java .io .IOException ;
2425import java .net .URI ;
2526import java .util .Arrays ;
@@ -237,9 +238,10 @@ public String getFormattedResult(final boolean HAS_COLORS) {
237238 gson = new GsonBuilder ().setPrettyPrinting ().create ();
238239 RESULTS = gson .fromJson (this .getJson (), LeetJsonItem [].class );
239240
240- } catch (IllegalStateException | NullPointerException ex ) {
241+ } catch (IllegalStateException | NullPointerException | JsonSyntaxException ex ) {
241242 Logger .getLogger (Leet .class .getName ()).log (Level .SEVERE , null , ex );
242- return "" ;
243+ json = "{ \" data\" : \" Unable to retrieve Torrent json data\" }" ;
244+ return json ;
243245 }
244246
245247 String output = "" ;
You can’t perform that action at this time.
0 commit comments