Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
mod_lti\service_exception_handler Class Reference

Handles exceptions when handling incoming LTI messages. More...

Public Member Functions

 __construct ($log)
 Constructor.
 
 handle ($exception)
 Echo an exception message encapsulated in XML.
 
 set_message_id ($id)
 Set the LTI message ID being handled.
 
 set_message_type ($type)
 Set the LTI message type being handled.
 

Protected Attributes

string $id = ''
 The LTI service message ID, if known.
 
bool $log = false
 Enable error response logging.
 
string $type = 'unknownRequest'
 The LTI service message type, if known.
 

Detailed Description

Handles exceptions when handling incoming LTI messages.

Ensures that LTI always returns a XML message that can be consumed by the caller.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

mod_lti\service_exception_handler::__construct ( $log)

Constructor.

Parameters
boolean$logEnable error response logging.

Member Function Documentation

◆ handle()

mod_lti\service_exception_handler::handle ( $exception)

Echo an exception message encapsulated in XML.

Parameters
Exception | Throwable$exceptionThe exception that was thrown

◆ set_message_id()

mod_lti\service_exception_handler::set_message_id ( $id)

Set the LTI message ID being handled.

Parameters
string$id

◆ set_message_type()

mod_lti\service_exception_handler::set_message_type ( $type)

Set the LTI message type being handled.

Parameters
string$type

The documentation for this class was generated from the following file: