Utility function for choosing an Int (which should be a string resource id) depending on the receiver and parameters.
fun <ExpectedType> Exception.extractErrorMessageResource(default: Int, provider: () -> Int): Int