Logger.Throwing(String, String, Throwable) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Log throwing an exception.
[Android.Runtime.Register("throwing", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V", "GetThrowing_Ljava_lang_String_Ljava_lang_String_Ljava_lang_Throwable_Handler")]
public virtual void Throwing (string? sourceClass, string? sourceMethod, Java.Lang.Throwable? thrown);
[<Android.Runtime.Register("throwing", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V", "GetThrowing_Ljava_lang_String_Ljava_lang_String_Ljava_lang_Throwable_Handler")>]
abstract member Throwing : string * string * Java.Lang.Throwable -> unit
override this.Throwing : string * string * Java.Lang.Throwable -> unit
Parameters
- sourceClass
- String
name of class that issued the logging request
- sourceMethod
- String
name of the method.
- thrown
- Throwable
The Throwable that is being thrown.
- Attributes
Remarks
Log throwing an exception.
This is a convenience method to log that a method is terminating by throwing an exception. The logging is done using the FINER level.
If the logger is currently enabled for the given message level then the given arguments are stored in a LogRecord which is forwarded to all registered output handlers. The LogRecord's message is set to "THROW".
Note that the thrown argument is stored in the LogRecord thrown property, rather than the LogRecord parameters property. Thus it is processed specially by output Formatters and is not treated as a formatting parameter to the LogRecord message property.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.