Exception

NAME

X::OpenMPT::Bindings - Exception class for libopenmpt errors

DESCRIPTION

Thrown when a libopenmpt C API function returns an error. Captures the $function name, numeric error $code, and human-readable $message.

ATTRIBUTES

function

method function(--> Str)

The name of the C API function that failed (e.g. openmpt_module_create_from_memory2).

code

method code(--> Int)

The libopenmpt error code (one of the OpenMPTError enum values).

message

method message(--> Str)

Human-readable error description returned by libopenmpt. Note: message is declared as $!message is built — the constructor accepts :message(...) as a named argument, and the message() method returns the formatted string (not the raw argument).

USAGE

try {
        OpenMPT::Bindings::Module.from-blob($bad-data);
        CATCH {
            when X::OpenMPT::Bindings {
                say .function;
                say .code;
                say .message;
            }
        }
    }

OpenMPT::Bindings v0.0.3

Raku bindings for libopenmpt (module music rendering)

Authors

  • Sasha Abbott

License

CC0-1.0

Dependencies

Test Dependencies

Provides

  • OpenMPT::Bindings
  • OpenMPT::Bindings::Exception
  • OpenMPT::Bindings::Module
  • OpenMPT::Bindings::ModuleExt
  • OpenMPT::Bindings::Native
  • OpenMPT::Bindings::NativeLib
  • OpenMPT::Bindings::Types
  • OpenMPT::Bindings::Util

Documentation

The Camelia image is copyright 2009 by Larry Wall. "Raku" is a trademark of the Yet Another Society. All rights reserved.

Built with Podlite — the markup and publishing tools behind this site.