Skip to content

PhysicsAPI reference

Class PhysicsCapabilityException

Namespace: MicroEngine.Physics
Assembly: MicroEngine.Physics.dll
Guide: Physics worlds

A request needed a physics capability the backend does not declare (Capabilities). It is thrown before anything changes: the world is as it was.

C#
public sealed class PhysicsCapabilityException : NotSupportedException, ISerializable

Inheritance

object ← Exception ← SystemException ← NotSupportedException ← PhysicsCapabilityException

Implements

ISerializable

Inherited Members

Exception.GetBaseException(), Exception.ToString(), Exception.GetType(), Exception.TargetSite, Exception.Message, Exception.Data, Exception.InnerException, Exception.HelpLink, Exception.Source, Exception.HResult, Exception.StackTrace, object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

PhysicsCapabilityException(string, string, PhysicsCapabilities)

Creates the error.

C#
public PhysicsCapabilityException(string operation, string backend, PhysicsCapabilities missing)

Parameters

operation string

The refused operation, e.g. “CreateBody(Dynamic)”.

backend string

The backend name (Backend).

missing PhysicsCapabilities

The undeclared capabilities the request needs.

Properties

Backend

The backend name.

C#
public string Backend { get; }

Property Value

string

Missing

The undeclared capabilities the request needs.

C#
public PhysicsCapabilities Missing { get; }

Property Value

PhysicsCapabilities

Operation

The refused operation.

C#
public string Operation { get; }

Property Value

string

Methods

ThrowIfMissing(PhysicsCapabilities, PhysicsCapabilities, string, string)

Throws when required holds a flag declared lacks: the check every backend runs before acting on a request.

C#
public static void ThrowIfMissing(PhysicsCapabilities declared, PhysicsCapabilities required, string operation, string backend)

Parameters

declared PhysicsCapabilities

required PhysicsCapabilities

operation string

backend string

Exceptions

PhysicsCapabilityException

A required capability is not declared.