Table of Contents

Class ShaderCompilerException

Namespace
Microsoft.Xna.Framework.Graphics
Assembly
MonoGame.Framework.dll

This exception occurs when a shader compiled at runtime has errors. It should provide enough information to help diagnose the bug.

[DataContract]
public sealed class ShaderCompilerException : Exception, ISerializable
Inheritance
ShaderCompilerException
Implements
Inherited Members

Constructors

ShaderCompilerException(string, string, ShaderStage, string, string)

Constructor.

public ShaderCompilerException(string sourceFile, string entrypoint, ShaderStage stage, string errors, string sourceCode)

Parameters

sourceFile string

The relative shader source file.

entrypoint string

The shader entrypoint function.

stage ShaderStage

The shader stage.

errors string

The error logging from the shader compiler.

sourceCode string

The source code that was being compiled.

Properties

Entrypoint

The shader entrypoint function.

public string Entrypoint { get; }

Property Value

string

Errors

The error logging from the shader compiler.

public string Errors { get; }

Property Value

string

SourceCode

The source code being compiled.

public string SourceCode { get; }

Property Value

string

SourceFile

The relative shader source file.

public string SourceFile { get; }

Property Value

string

Stage

The shader stage.

public ShaderStage Stage { get; }

Property Value

ShaderStage

Methods

ToString()

Creates and returns a string representation of the current exception.

public override string ToString()

Returns

string

A string representation of the current exception.