martmists
11/25/2024, 6:31 PMcoroutineScope {
launch {
throw NotImplementedError() // Currently somehow deadlocks
}
launch {
// ...
}
}
// Ideally coroutineScope exits early and also (re-)throw the NotImplementedError
Sam
11/25/2024, 6:58 PMSam
11/25/2024, 6:58 PMmartmists
11/25/2024, 7:12 PMwait
martmists
11/25/2024, 7:24 PMcoroutineScope {
for (field in operation.fields) {
launch {
wrapper {
try {
map[field.alias ?: field.name] = execute(operation, defMap[field.name] ?: throw GraphQLException("Cannot query field \"${field.name}\" on type \"${operation.type}\".", field.loc), field)
} catch (e: GraphQLException) {
errors += e.errors.map { it.withParent(field.alias ?: field.name) }
} catch (e: Exception) { // Added catch clause
e.printStackTrace()
throw e
}
}
}
}
}
martmists
11/25/2024, 10:39 PMDon Mitchell
12/02/2024, 10:08 AMsupervisorScope
it swallows everything except CancellationException
I think; so, you need to wrap your error in a throw CancellationException(e)
. I'm not clear on the scoping of CoroutineExceptionHandler
, I know it can't "ignore" the error to allow progression bc the stack's already unwound.