Exceptions

Exceptions in the Kipon.Xrm package should not be thrown my your code. The exception are in there to support the Kipon.Xrm.Tools, and when running within a plugin, all Exceptions will be mapped to Microsoft.Xrm.Sdk.InvalidPluginExecutionException. As such the description of each exception in this documentation for completness.

Kipon.Xrm.Exceptions.BaseException

The base class for all Kipon.Solid.Plugin exceptions

Kipon.Xrm.Exceptions.CircularDependencyException

This exception is thrown if the service builder i running into a circular dependency, ether directly or indirectly, Ex. A depends on B and B depends on A. The Kipon Solid plugin framework do not support cirtular dependencies, if you get the error, reorganize the dependencies betweeen your services and remove the curcular nature.

Kipon.Xrm.Exceptions.InvalidConstructorServiceArgumentException

At least one argument in a service constructor could not be resolved

Kipon.Xrm.Exceptions.MultiImplementationOfSameInterfaceException

More than one implementation of a service interface was found. Each service should be implemented once. Do not write unit-test code in your plugin add mock services to your unit test library, not the actual library. Each service that should be injectable can be implemented only once.

Kipon.Xrm.Exceptions.MultipleLogicalNamesException

Parameters in the plugin step method prepresents different entities, ex. the target is an account, while the preimage is a contact. That is not supported,

Kipon.Xrm.Exceptions.TypeMismatchException

The result instance of a resolved parameter in a step or service does not implementet the expected interface.

Kipon.Xrm.Exceptions.UnavailableImageException

An image was expected in the images payload of the plugin, but it was not present. You must use the kipon solid deployment tool to ensure correct images are created within the solution. It could also be related to solution deployment to test and prod environment. Make sure you have all the steps and more within your solution, and preffable use manage solution to deploy your plugin, and ensure to upgrade your solution on each import. This will help ensure consistency betweeen your development environment and test/prod environment.

Kipon.Xrm.Exceptions.UnknownEntityTypeException

The entity logical name mentioned in this exception cannot be created as a strongly type entity. Make sure that the entity is mentioned in the Entities\filter.xml file, regenerate entities, compile, deploy and try the action again.

Kipon.Xrm.Exceptions.UnresolvableConstructorException

A service has more than one constructor. You must mark the one to be used by the service constructor with the [Kipon.Xrm.Attributes.ImportingConstructor] attribute

Kipon.Xrm.Exceptions.UnresolvablePluginMethodException

Exception is thrown if a plugin extends Kipon.Xrm.BasePlugin, but not method in the plugin is mapping to a step.

Kipon.Xrm.Exceptions.UnresolvableTypeException

Exception is thrown if a parameter in a constructor or step could not be reolved to an actual class instance that can ether be extracted from the plugin payload or created from its constructor.

Kipon.Xrm.Exceptions.UnresolveableParameterException

Exception is throun if a parameter in a plugin step cannot be resolved to a value

Kipon.Xrm.Exceptions.UnresolvedQueryParameter

Exception is thrown if a Microsoft.Xrm.Sdk.Query.QueryExpression is requested (only supported when listening to message RetrieveMultiple) was not precent in the plugin payload or the query could not be converted to a Microsoft.Xrm.Sdk.Query.QueryExpression.

© Kipon ApS 2020, 2021, 2022, 2023. All content on the page is the property of Kipon ApS. Any republish or copy of this content is a violation. The content of this site is NOT open source, and cannot be copied, republished or used in any context without explcit permission from the owner.