# RadiusBackingResourceProjectionException Constructors

- Package: [Aspire.Hosting.Radius](/reference/api/csharp/aspire.hosting.radius.md)
- Type: [RadiusBackingResourceProjectionException](/reference/api/csharp/aspire.hosting.radius/radiusbackingresourceprojectionexception.md)
- Kind: `Constructors`
- Members: `2`

Thrown when a Radius backing resource -- a cache, database, or queue provisioned by a Radius recipe rather than deployed as a `Radius.Compute/containers` workload -- cannot be projected to its consumers: its address cannot be determined, or the recipe's own connection and credential outputs cannot be described.

<a id="constructor"></a>
<a id="constructor-iresource-string"></a>

## RadiusBackingResourceProjectionException(IResource, string)

- Name: `Constructor(IResource, string)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/f4c27f2d43ddc1cacd0dd083b30d1fea1cee7a62/src/Aspire.Hosting.Radius/RadiusBackingResourceProjectionException.cs#L61-L63)

Initializes a new instance of the [RadiusBackingResourceProjectionException](/reference/api/csharp/aspire.hosting.radius/radiusbackingresourceprojectionexception.md) class.

```csharp
public sealed class RadiusBackingResourceProjectionException
{
    public RadiusBackingResourceProjectionException(
        IResource resource,
        string message)
    {
        // ...
    }
}
```

## Parameters

- `resource` (`IResource`)
  The backing resource that could not be projected.
- `message` (`string`)
  The message that describes the error.

## Exceptions

- `ArgumentNullException` -- `resource` is `null`.

<a id="constructor-iresource-string-exception"></a>

## RadiusBackingResourceProjectionException(IResource, string, Exception?)

- Name: `Constructor(IResource, string, Exception?)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/f4c27f2d43ddc1cacd0dd083b30d1fea1cee7a62/src/Aspire.Hosting.Radius/RadiusBackingResourceProjectionException.cs#L81-L86)

Initializes a new instance of the [RadiusBackingResourceProjectionException](/reference/api/csharp/aspire.hosting.radius/radiusbackingresourceprojectionexception.md) class with a reference to the inner exception that is the cause of this exception.

```csharp
public sealed class RadiusBackingResourceProjectionException
{
    public RadiusBackingResourceProjectionException(
        IResource resource,
        string message,
        Exception? innerException)
    {
        // ...
    }
}
```

## Parameters

- `resource` (`IResource`)
  The backing resource that could not be projected.
- `message` (`string`)
  The message that describes the error.
- `innerException` (`Exception?`)
  The exception that is the cause of this exception, or `null` when none.

## Exceptions

- `ArgumentNullException` -- `resource` is `null`.

## Remarks

The parameterless and message-only constructors that `InvalidOperationException` offers are deliberately not exposed: [RadiusBackingResourceProjectionException.Resource](/reference/api/csharp/aspire.hosting.radius/radiusbackingresourceprojectionexception/properties.md#resource) is part of this type's contract -- a caller catching it does so to report which resource failed -- and an instance without one could not answer that.
