More informative error message
This commit is contained in:
@@ -145,7 +145,7 @@ class RootServer {
|
|||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
throw NoShellException(e)
|
throw NoShellException(e)
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
val token2 = UUID.randomUUID().toString()
|
val token2 = UUID.randomUUID().toString()
|
||||||
val persistence = File(context.codeCacheDir, ".librootkotlinx-uuid")
|
val persistence = File(context.codeCacheDir, ".librootkotlinx-uuid")
|
||||||
val uuid = context.packageName + '@' + if (persistence.canRead()) persistence.readText() else {
|
val uuid = context.packageName + '@' + if (persistence.canRead()) persistence.readText() else {
|
||||||
@@ -157,6 +157,9 @@ class RootServer {
|
|||||||
writer.writeBytes(script.toString())
|
writer.writeBytes(script.toString())
|
||||||
writer.flush()
|
writer.flush()
|
||||||
reader.lookForToken(token2) // wait for ready signal
|
reader.lookForToken(token2) // wait for ready signal
|
||||||
|
} catch (e: Exception) {
|
||||||
|
throw RuntimeException("Failed to launch root daemon", e)
|
||||||
|
}
|
||||||
output = writer
|
output = writer
|
||||||
require(!active)
|
require(!active)
|
||||||
active = true
|
active = true
|
||||||
|
|||||||
Reference in New Issue
Block a user