HydraExpress™ C++ API Reference Guide

 
Loading...
Searching...
No Matches
rwsf::ServiceShutdownException Class Reference

Shuts down a service and sends an error message. More...

#include <rwsf/webservice/except.h>

Inheritance diagram for rwsf::ServiceShutdownException:
rwsf::Exception

Public Member Functions

 ServiceShutdownException ()
 ServiceShutdownException (const char *msg)
virtual ~ServiceShutdownException () noexcept
virtual Exceptionclone (void) const
virtual void raise (void) const
Public Member Functions inherited from rwsf::Exception
 Exception (const char *msg)
 Exception (const Exception &)
 Exception (const ExceptionInfo &eInfo)
 Exception (const rwsf::ExceptionInfo &eInfo, const LocalizedMessage &msg)
 Exception (const std::string &msg)
virtual ~Exception () noexcept
const char * getFileName () const
const char * getFunctionName () const
unsigned long getLineNumber () const
virtual bool operator!= (const Exception exc2)
Exceptionoperator= (const Exception &m)
virtual bool operator== (const Exception exc2)
virtual const char * what () const noexcept

Additional Inherited Members

Detailed Description

Class rwsf::ServiceShutdownException provides a means to shut down a service from within the service implementation.

In the case of HTTP and HTTPS transports, any request that results in this server exception, the server sends a 500 "Internal Server Error" response back.

For the RWSF Agent, the service is taken out of service and subsequent requests yield the "Not Found" 400 error, which is standard Agent behavior.

For a standalone HTTP or HTTPS server, the listener shuts down and subsequent requests fail. The thread that contains the listener object can then call the method isStopped() to see if has been shut down.

Note
This is the only exception class in webservices. All other exception classes are in the RWSF Core Library.

Constructor & Destructor Documentation

◆ ServiceShutdownException() [1/2]

rwsf::ServiceShutdownException::ServiceShutdownException ( )

Default constructor. Creates an exception with the message "Service Shutdown".

◆ ServiceShutdownException() [2/2]

rwsf::ServiceShutdownException::ServiceShutdownException ( const char * msg)

Creates an exception with the message msg.

◆ ~ServiceShutdownException()

virtual rwsf::ServiceShutdownException::~ServiceShutdownException ( )
virtualnoexcept

Default destructor.

Member Function Documentation

◆ clone()

virtual Exception * rwsf::ServiceShutdownException::clone ( void ) const
virtual

Creates a new copy of self on the heap. Overridden in derived classes to construct an instance of the correct derived type. It is up to the user to ensure that the returned Exception object is deleted.

Reimplemented from rwsf::Exception.

◆ raise()

virtual void rwsf::ServiceShutdownException::raise ( void ) const
virtual

Throws self. Overridden in derived classes to throw the correct derived type.

Reimplemented from rwsf::Exception.

Copyright © 2026 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.