forked from StarOpenSource/Engine
Allow for null in CrashCategory return values
This commit is contained in:
parent
2629e940e7
commit
9b264ca6cc
4 changed files with 7 additions and 4 deletions
|
@ -68,5 +68,5 @@ interface CrashCategory {
|
|||
channelSettings: ChannelSettings?,
|
||||
throwable: Throwable?,
|
||||
fatal: Boolean,
|
||||
): LinkedHashMap<String, Any>
|
||||
): LinkedHashMap<String, Any?>
|
||||
}
|
||||
|
|
|
@ -20,12 +20,13 @@
|
|||
|
||||
package de.staropensource.engine.base.implementable.logging
|
||||
|
||||
import de.staropensource.engine.base.logging.Filterer
|
||||
import de.staropensource.engine.base.type.logging.Call
|
||||
|
||||
/**
|
||||
* Provides methods for filtering log calls.
|
||||
*
|
||||
* @see de.staropensource.engine.logging.Filterer
|
||||
* @see Filterer
|
||||
* @since v1-alpha10
|
||||
*/
|
||||
interface Filter {
|
||||
|
|
|
@ -59,7 +59,7 @@ class InfoCrashCategory private constructor() : CrashCategory {
|
|||
channelSettings: ChannelSettings?,
|
||||
throwable: Throwable?,
|
||||
fatal: Boolean,
|
||||
): LinkedHashMap<String, Any> {
|
||||
): LinkedHashMap<String, Any?> {
|
||||
return linkedMapOf(
|
||||
Pair("Origin", linkedMapOf<String, Any>(
|
||||
Pair("Class", call.origin),
|
||||
|
|
|
@ -110,7 +110,9 @@ class CrashHandler private constructor() {
|
|||
|
||||
builder.append("\n${" ".repeat(indent)}-> ${entry}")
|
||||
|
||||
if (map[entry] is LinkedHashMap<*, *>) // Value is a map
|
||||
if (map[entry] == null) // Value is null
|
||||
true
|
||||
else if (map[entry] is LinkedHashMap<*, *>) // Value is a map
|
||||
builder.append(
|
||||
compileCategory(
|
||||
map[entry] as LinkedHashMap<*, *>,
|
||||
|
|
Loading…
Reference in a new issue