if using a machiavelli chart object, raise 'metric_failed()' on error