---
title: "ModelverseException"
sidebar_label: "ModelverseException"
description: "Kotlin binding reference: ModelverseException."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.modelverse](../index.md)/[ModelverseException](index.md)

# ModelverseException

[common]\
class [ModelverseException](index.md)(message: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), val codeName: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) = &quot;&quot;, cause: [Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html)? = null)

A Modelverse failure, in words a person can act on: a model directory that holds no checkpoint the library serves, a weight file the runtime cannot decode, a request past the context window, a library that did not load.

[codeName](codeName.md) is the runtime's machine-readable status name (`NOT_FOUND`, `INVALID_ARGUMENT`, `LICENSE_FAILED`, ...) when the failure originated in the runtime; empty for a failure of the binding itself. Branch on it, never on the message text: a release build may print an opaque message code in place of the text, and the name survives.

## Constructors

| | |
|---|---|
| [ModelverseException](ModelverseException.md) | [common]<br>constructor(message: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), codeName: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) = &quot;&quot;, cause: [Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html)? = null) |

## Properties

| Name | Summary |
|---|---|
| [codeName](codeName.md) | [common]<br>val [codeName](codeName.md): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) |