if (is_null($model)) {
            throw new Exception("Could not fetch list of classes - no production model given"); 
        }