Crashpad
Classes | Public Member Functions | List of all members
crashpad::ExceptionHandlerServer Class Reference

Runs the main exception-handling server in Crashpad’s handler process. More...

#include "util/win/exception_handler_server.h"

Classes

class  Delegate
 

Public Member Functions

 ExceptionHandlerServer (base::mac::ScopedMachReceiveRight receive_port)
 Constructs an ExceptionHandlerServer object. More...
 
void Run (UniversalMachExcServer::Interface *exception_interface)
 Runs the exception-handling server. More...
 
 ExceptionHandlerServer (const std::string &pipe_name)
 Constructs the exception handling server. More...
 
void Run (Delegate *delegate)
 Runs the exception-handling server. More...
 
void Stop ()
 Stops the exception-handling server. Returns immediately. The object must not be destroyed until Run() returns.
 

Detailed Description

Runs the main exception-handling server in Crashpad’s handler process.

Runs the main exception-handling server in Crashpad's handler process.

Constructor & Destructor Documentation

crashpad::ExceptionHandlerServer::ExceptionHandlerServer ( base::mac::ScopedMachReceiveRight  receive_port)
explicit

Constructs an ExceptionHandlerServer object.

Parameters
[in]receive_portThe port that exception messages and no-senders notifications will be received on.
crashpad::ExceptionHandlerServer::ExceptionHandlerServer ( const std::string &  pipe_name)
explicit

Constructs the exception handling server.

Parameters
[in]pipe_nameThe name of the pipe to listen on. Must be of the form "\\.\pipe\<some_name>".

Member Function Documentation

void crashpad::ExceptionHandlerServer::Run ( UniversalMachExcServer::Interface exception_interface)

Runs the exception-handling server.

Parameters
[in]exception_interfaceAn object to send exception messages to.

This method monitors the receive port for exception messages and no-senders notifications. It continues running until it has no more clients, indicated by the receipt of a no-senders notification. It is important to assure that a send right exists in a client (or has been queued by mach_msg() to be sent to a client) prior to calling this method, or it will detect that it is sender-less and return immediately.

All exception messages will be passed to exception_interface.

This method must only be called once on an ExceptionHandlerServer object.

If an unexpected condition that prevents this method from functioning is encountered, it will log a message and terminate execution. Receipt of an invalid message on the receive port will cause a message to be logged, but this method will continue running normally.

void crashpad::ExceptionHandlerServer::Run ( Delegate delegate)

Runs the exception-handling server.

Parameters
[in]delegateThe interface to which the exceptions are delegated when they are caught in Run(). Ownership is not transferred.

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