ACO errors
The return value from an asynchronous call is either the return value of the platform function or an AcoError; the AcoError identifies the problem that occurred while making the asynchronous call.
To test for an error, isAcoError can be used. For example, to determine whether an error occurred, the following code can be used.
For standard asynchronous calls:
rc := isUppercase asyncCallWith: param1.
rc isAcoError ifTrue: [self error: rc printString]
For resource future calls:
future := isUppercase futureCallWith: param1.
rc := future value.
rc isAcoError ifTrue: [self error: rc printString].
For static future calls:
staticFuture := AcoResourceManager default createStaticFuture.
staticFuture isAcoError ifTrue: self error: staticFuture printString].
isUppercase staticFutureCall: staticFuture with: parm1.
rc := future value.
rc isAcoError ifTrue: [
AcoResourceManager default returnStaticFuture: staticFuture.
self error: rc printString].
AcoResourceManager default returnStaticFuture: staticFuture.
ACO errors include:
Resources invalid
The operating system resources (for example, the thread) are no longer valid. This may occur after an image is shut down and restarted.
Invalid static future
The future being passed into a static future call is either not a type of StaticFuture or is a static future that has invalid operating system resources. Resources may become invalid after an image is shut down and restarted.
The resource is not available
There are no available resources.
The static future is not available
The static future being used to make the call is currently executing a previous call.
Resources lost
An asynchronous call was in progress when an image was saved. When the image restarted, the asynchronous call cannot continue because the operating system resources (for example, the thread) are no longer valid.
The value is not available
The future has not completed the call and the return value is not ready.
Asynchronous callout not supported
The platform does not support asynchronous callout.
Primitive failed due to general protection fault
The platform function that was called caused a general protection fault.
Invalid stack size requested
A stack size was requested when a thread was locked using the lockThreadIn: method of AcoResourceManager.
Requested future value in a system callback
You cannot request the value of a future during a callback into Smalltalk from the operating system.
Last modified date: 08/10/2017