Composable alternative to exceptions and error codes