Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e0b4bc2 authored by Jonathan Lepage's avatar Jonathan Lepage Committed by Automerger Merge Worker
Browse files

Merge "Document that Log can quietly swallow UnknownHostExceptions." am:...

Merge "Document that Log can quietly swallow UnknownHostExceptions." am: 9d018456 am: fc60d843 am: 2bf9cccb

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1873073

Change-Id: If5276716a304cfc0e795e74d3457f2bf9b4f0f17
parents 573e89de 2bf9cccb
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -62,6 +62,10 @@ import java.net.UnknownHostException;
 * another buffer allocation and copy, and even more pressure on the gc.
 * That means that if your log message is filtered out, you might be doing
 * significant work and incurring significant overhead.
 *
 * <p>When calling the log methods that take a Throwable parameter,
 * if any of the throwables in the cause chain is an <code>UnknownHostException</code>,
 * then the stack trace is not logged.
 */
public final class Log {
    /** @hide */
@@ -341,6 +345,9 @@ public final class Log {

    /**
     * Handy function to get a loggable stack trace from a Throwable

     * <p>If any of the throwables in the cause chain is an <code>UnknownHostException</code>,
     * this returns an empty string.
     * @param tr An exception to log
     */
    @NonNull