# Class CommandNotFoundException OptimaJet.Workflow.Core.Fault.CommandNotFoundException Represents an exception thrown when a command cannot be found in a workflow scheme. Namespace: [OptimaJet.Workflow.Core.Fault](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Fault/) ```csharp public class CommandNotFoundException : Exception, ISerializable ``` ## Type Hierarchy - [Exception](https://learn.microsoft.com/dotnet/api/system.exception) - CommandNotFoundException Current type - Implemented interfaces - [ISerializable](https://learn.microsoft.com/dotnet/api/system.runtime.serialization.iserializable) ## Constructors `public CommandNotFoundException(string message)` Initializes a new instance of the [CommandNotFoundException](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Fault/CommandNotFoundException/) class with a custom error message. ### Parameters | Name | Type | Description | | --- | --- | --- | | `message` | `String` | The message that explains why the exception was thrown. | `public CommandNotFoundException(string commandName, string schemeCode)` Initializes a new instance of the [CommandNotFoundException](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Fault/CommandNotFoundException/) class for a missing command name in a specific workflow scheme. ### Parameters | Name | Type | Description | | --- | --- | --- | | `commandName` | `String` | The name of the command that was not found. | | `schemeCode` | `String` | The workflow scheme code that was searched. | [Previous CommandAlreadyExistsException](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Fault/CommandAlreadyExistsException/) [Next CommandNotValidException](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Fault/CommandNotValidException/)