diff --git a/ga4gh/datamodel/rna_quantification.py b/ga4gh/datamodel/rna_quantification.py index 4a35cadff..f8d3ba618 100644 --- a/ga4gh/datamodel/rna_quantification.py +++ b/ga4gh/datamodel/rna_quantification.py @@ -111,7 +111,11 @@ def getRnaQuantificationByIndex(self, index): self._rnaQuantificationIds[index]] def getRnaQuantification(self, rnaQuantificationId): - return self._rnaQuantificationIdMap[rnaQuantificationId] + try: + return self._rnaQuantificationIdMap[rnaQuantificationId] + except KeyError: + raise exceptions.RnaQuantificationNotFoundException( + rnaQuantificationId) def getRnaQuantifications(self): return [self._rnaQuantificationIdMap[id_] for