Seite 1 von 1

Ursache von Exceptions im stacktrace ausgeben

Verfasst: 19 Jul 2019, 19:24
von Xenu
Es wäre schön wenn die Ursache von Exceptions angezeigt würde. Beispiel:

Code: Alles auswählen

java.io.IOException: Could not store settings to C:\Users\XXXXX\AppData\Roaming\TV-Browser\4.0.1\programinfo.ProgramInfo.prop.temp
  at tvbrowser.extras.common.ConfigurationHandler.storeSettings(ConfigurationHandler.java:169)
  at tvbrowser.extras.programinfo.ProgramInfoSettings.storeSettings(ProgramInfoSettings.java:246)
  at tvbrowser.extras.programinfo.ProgramInfo.store(ProgramInfo.java:181)
....
Leider steht die Ursache nicht da. In meinem Fall hatte ich einen PC Absturz, also ist vielleicht das Verzeichnis murks, darum kümmere ich mich noch...

Aber mal in die sourcen geschaut...
https://sourceforge.net/p/tvbrowser/cod ... ndler.java

da steht:

Code: Alles auswählen

    catch (Throwable thr) {
      throw new IOException("Could not store settings to " + tmpPropFile.getAbsolutePath());
    }
könntet Ihr das bitte ändern in

Code: Alles auswählen

    catch (Throwable thr) {
      throw new IOException("Could not store settings to " + tmpPropFile.getAbsolutePath(), thr);
    }
Auch an anderen Stellen in der Klasse. Liegt womöglich daran, daß damals der entsprechende Constructor noch gar nicht vorhanden war.

Re: Ursache von Exceptions im stacktrace ausgeben

Verfasst: 20 Jul 2019, 12:22
von Xenu
In meinem Fall stellte sich heraus dass die Quelldatei einen riesigen Block voller 0x0 hatte. Denkbar wäre z.B. dass das Schreiben

Code: Alles auswählen

settings.store(fOut, "Settings");
scheiterte weil "settings" selbst irgendeinen Mist enthielt. Nach Entfernen des 0-Blocks ging es wieder. Mein Wunsch aus dem Titeltext bleibt aber :-)

Re: Ursache von Exceptions im stacktrace ausgeben

Verfasst: 20 Jul 2019, 14:36
von ds10
Ich habe das jetzt so eingebaut, mit der morgigen Nightly ist das dann verfügbar.