diff options
Diffstat (limited to 'src/main/kotlin')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt | 4 | ||||
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/remote/Security.kt | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt b/src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt index 145657df..c7103200 100644 --- a/src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt +++ b/src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt @@ -65,7 +65,9 @@ open class RemoteAgent<out T>(val serviceManager: ServiceManager<T>) { /** * Executes defined call to a remote web service. */ - inline fun <reified RET : Any, T> call(noinline function: T.(Request?) -> Deferred<List<RET>>): Deferred<List<RET>> { + inline fun <reified RET : Any, T> call( + noinline function: T.(Request?) -> Deferred<List<RET>> + ): Deferred<List<RET>> { val (url, method) = serviceManager.getCalls()[function.toString()] ?: throw IllegalStateException("Function not specified!") return callAgent.jsonRpcCall(url, method = method).then { diff --git a/src/main/kotlin/pl/treksoft/kvision/remote/Security.kt b/src/main/kotlin/pl/treksoft/kvision/remote/Security.kt index 4e89f558..2d4ab9eb 100644 --- a/src/main/kotlin/pl/treksoft/kvision/remote/Security.kt +++ b/src/main/kotlin/pl/treksoft/kvision/remote/Security.kt @@ -70,6 +70,7 @@ abstract class SecurityMgr { * Executes given block of code after successful authentication. * @param block a block of code */ + @Suppress("NestedBlockDepth", "TooGenericExceptionCaught") suspend fun <T> withAuth(block: suspend () -> T): T { return try { block().also { |