Errors
Types thrown as errors – see CompilerError
too.
Topics
struct ProtocolError
struct ProtocolError
Thrown on detecting an error communicating with the Sass embedded compiler: for example a badly formed or out-of-sequence message.
The payload is text describing the nature of the problem. There is probably nothing that a user can do about this.
Declaration
public struct ProtocolError: Error, CustomStringConvertible
struct LifecycleError
struct LifecycleError
Thrown on detecting a usage error of the Compiler
API, for example trying to use it after shutdown.
Declaration
public struct LifecycleError: Error, CustomStringConvertible
enum SassFunctionError
enum SassFunctionError
Errors thrown for common SassFunction
scenarios.
Generally these are thrown from your SassFunction
s by SassValue
family
methods in response to error scenarios, for example a user passes a number where
you expect a string, or a number in radians where you expected a length. Then the
compilation fails, giving the description of the error as the failure reason.
Declaration
public enum SassFunctionError: Error, CustomStringConvertible