Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
アプリケーションを作成していますが、このアプリケーションではすべての例外をファイルに書き込む必要があります。エラーの行番号を取得する必要があり、これを使用して行番号を取得しています:
entry.setStackTrace(e.getStackTrace()[0].getLineNumber());
しかし、残念ながら、そのスタック トレースは null になる可能性があります。私の質問は - スタック トレースを null にできますか?
例外がスローされた場合、
e.getStackTrace()
null にすることはできません。
しかし、ロギング出力に std Java Logger または android logger を使用しないのはなぜですか?