You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Memory caching and retrieval utility.

Syntax

Response = Memory_Services(Service, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10)

Returns

The meaning of the response value depends on the service.

Parameters

ParameterDescription
ServiceThe name of the service being requested. Required.
Param1 - Param10Generic parameters.

Remarks

This SRP FrameWorks utility service is a general purpose error tracking and reporting utility. Unlike OpenInsight error routines, Error_Services does not interfere with normal operations even if a previous error condition was set. The developer is given the right (and responsibility) to make these decisions.

Services

ServiceDescription
KeyExists

Usage:
Memory_Services('KeyExists', KeyID)

Comments:
Sets an error to the stack. This will automatically clear any existing error conditions first so this error will be the only one on the stack.

Returns:
N/A 

GetValue

Usage:
Memory_Services('GetValue', KeyID, NotExpired, ExpirationDuration)

Comments:
Adds an error to the stack. This will not clear existing error conditions first. It is intended to allow higher level routines to add more information to an existing error condition or simply to maintain an ongoing error log for some troubleshooting or debugging purposes.

Returns:
N/A

SetValue

Usage:
Memory_Services('SetValue', KeyID, Value)

Comments:
Clears all error conditions and related information.

Returns:
N/A

RemoveKey

Usage:
Memory_Services('RemoveKey', KeyID)

Comments:
Returns the most current error message.

Returns:
The most current error message.

CreateHashTable

Usage:
Memory_Services('CreateHashTable')

Comments:
Returns the stack of error messages. This will be @FM delimited.

Returns:
The stack of error messages.

ReleaseHashTable

Usage:
Memory_Services('ReleaseHashTable')

Comments:
Returns True if there is an error condition, False if there is no error condition. Caller will still need to use the GetMessage or GetMessages service to determine what the error is. The HasError service allows the caller to embed the Error_Services service call inside of a conditional statement like this:

If Error_Services('HasError') then
* An error has occured. Proceed accordingly.
ErrorMessage = Error_Services('GetMessage')
end else
* No error has occured.
end

Returns:
True if there is an error condition, False if there is no error condition.

GetHandle

Usage:
Memory_Services('GetHandle')

Comments:
Returns True if there are no error conditions, False if there is an error condition. This is the opposite of the HasError service and exists for improved readability.

Returns:
True if there are no error conditions, False if there is an error condition.

Param1 - Param10

The proper use of the generic arguments are defined in the definition of each service above.

  • No labels