FTException Derived Type

type, public, extends(FTObject) :: FTException


Inherits

type~~ftexception~~InheritsGraph type~ftexception FTException type~ftdictionary FTDictionary type~ftexception->type~ftdictionary infoDictionary_ type~ftobject FTObject type~ftexception->type~ftobject type~ftdictionary->type~ftobject type~ftlinkedlist FTLinkedList type~ftdictionary->type~ftlinkedlist entries type~ftlinkedlist->type~ftobject type~ftlinkedlistrecord FTLinkedListRecord type~ftlinkedlist->type~ftlinkedlistrecord head, tail type~ftlinkedlistrecord->type~ftobject recordObject type~ftlinkedlistrecord->type~ftobject type~ftlinkedlistrecord->type~ftlinkedlistrecord next, previous

Finalization Procedures

final :: destructException

  • public subroutine destructException(self)

    The destructor for the class. Do not call this directly. Call the release() procedure instead

    Arguments

    Type IntentOptional Attributes Name
    type(FTException) :: self

Type-Bound Procedures

procedure, public :: init => initFTObject

procedure, public :: description => FTObjectDescription

  • public function FTObjectDescription(self)

    Returns a character string of length DESCRIPTION_CHARACTER_LENGTH that represents the object. the base class implementation returns an empty string. Note that if the description is too long, the expected string will be truncated. In general, one wants to use printDescription.

    Arguments

    Type IntentOptional Attributes Name
    class(FTObject) :: self

    Return Value character(len=DESCRIPTION_CHARACTER_LENGTH)

procedure, public, non_overridable :: copy => copyFTObject

  • private function copyFTObject(self) result(copy)

    Base class implementation of the assignment function. Call this from within any subclasses copy assignment function. All FTObject's implementation does is set the reference count to one, implying no additional ownership to the caller that is creating the copy.

    Arguments

    Type IntentOptional Attributes Name
    class(FTObject), intent(in) :: self

    Return Value class(FTObject), POINTER

procedure, public, non_overridable :: retain => retainFTObject

  • public subroutine retainFTObject(self)

    Retain increases the reference count by one and implies ownership to the caller. ### Usage: CALL obj\ % retain()

    Arguments

    Type IntentOptional Attributes Name
    class(FTObject) :: self

procedure, public, non_overridable :: isUnreferenced

  • public function isUnreferenced(self)

    Owners of objects should call isUnreferenced after releasing a pointer object. If true, the object should be deallocated and then set to point to NULL()

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(FTObject) :: self

    Return Value logical

procedure, public, non_overridable :: refCount

  • public function refCount(self)

    Returns the reference count for the object. Normally this is done only for debugging purposes.

    Arguments

    Type IntentOptional Attributes Name
    class(FTObject) :: self

    Return Value integer

procedure, public :: initFTException

  • public subroutine initFTException(self, severity, exceptionName, infoDictionary)

    The main initializer for the class

    Arguments

    Type IntentOptional Attributes Name
    class(FTException) :: self
    integer :: severity
    character(len=*) :: exceptionName
    class(FTDictionary), optional, POINTER :: infoDictionary

procedure, public :: initWarningException

  • public subroutine initWarningException(self, msg)

    A convenience initializer for a warning error that includes the key "message" in the infoDictionary. Use this initializer as an example of how to write one's own exception.

    Arguments

    Type IntentOptional Attributes Name
    class(FTException) :: self
    character(len=*) :: msg

procedure, public :: initFatalException

  • public subroutine initFatalException(self, msg)

    A convenience initializer for a fatal error that includes the key "message" in the infoDictionary.Use this initializer as an example of how to write one's own exception.

    Arguments

    Type IntentOptional Attributes Name
    class(FTException) :: self
    character(len=*) :: msg

procedure, public :: initAssertionFailureException

  • public subroutine initAssertionFailureException(self, msg, expectedValueObject, ObservedValueObject, level)

    A convenience initializer for an assertion error that includes the keys:

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(FTException) :: self
    character(len=*) :: msg
    class(FTValue), POINTER :: expectedValueObject
    class(FTValue), POINTER :: ObservedValueObject
    integer :: level

procedure, public :: setInfoDictionary

  • public subroutine setInfoDictionary(self, dict)

    Sets and retains the exception infoDictionary

    Arguments

    Type IntentOptional Attributes Name
    class(FTException) :: self
    class(FTDictionary), POINTER :: dict

procedure, public :: infoDictionary

  • public function infoDictionary(self)

    Returns the exception's infoDictionary. Does not transfer ownership/reference count is unchanged.

    Arguments

    Type IntentOptional Attributes Name
    class(FTException) :: self

    Return Value class(FTDictionary), POINTER

procedure, public :: exceptionName

  • public function exceptionName(self)

    Returns the string representing the name set for the exception.

    Arguments

    Type IntentOptional Attributes Name
    class(FTException) :: self

    Return Value character(len=ERROR_MSG_STRING_LENGTH)

procedure, public :: severity

  • public function severity(self)

    Returns the severity level of the exception.

    Arguments

    Type IntentOptional Attributes Name
    class(FTException) :: self

    Return Value integer

procedure, public :: printDescription => printFTExceptionDescription

  • public subroutine printFTExceptionDescription(self, iUnit)

    A basic printing of the exception and the info held in the infoDictionary.

    Arguments

    Type IntentOptional Attributes Name
    class(FTException) :: self
    integer :: iUnit

procedure, public :: className => exceptionClassName

  • public function exceptionClassName(self) result(s)

    Class name returns a string with the name of the type of the object

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(FTException) :: self

    Return Value character(len=CLASS_NAME_CHARACTER_LENGTH)