Add asserts
parent
551a1d70ae
commit
11f19b1f76
@ -0,0 +1,8 @@
|
||||
package org.koitharu.kotatsu.parsers.util
|
||||
|
||||
fun <T : Any> T?.assertNotNull(name: String): T? {
|
||||
assert(this != null) {
|
||||
"Value $name is null"
|
||||
}
|
||||
return this
|
||||
}
|
||||
Loading…
Reference in New Issue