Skip to content

Commit 7de1fbd

Browse files
committed
chore(mps-model-adapters): clarify exception case
1 parent 69be9bd commit 7de1fbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mps-model-adapters/src/main/kotlin/org/modelix/model/mpsadapters/MPSLanguageRepository.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class MPSLanguageRepository(private val repository: SRepository) : ILanguageRepo
3131

3232
val conceptId = try {
3333
SConceptId.deserialize(uid.substring(4))
34-
} catch (e: Exception) { return null } ?: return null
34+
} catch (e: NumberFormatException) { return null } ?: return null // in case the id cannot be parsed
3535

3636
val conceptDescriptor = ConceptRegistry.getInstance().getConceptDescriptor(conceptId)
3737

0 commit comments

Comments
 (0)