FunctionNotFoundException
From REALbasicWiki
| Overall article skill | ✭ |
| |||||
|---|---|---|---|---|---|
| Available on | | ||||
| General | |||||
| Superclass | RuntimeException | ||||
| Interfaces | none | ||||
| Constants | |||||
|
none | |||||
| Methods | |||||
|
none | |||||
| Properties | |||||
|
none | |||||
| Events | |||||
|
none | |||||
|
NOTE: You can get descriptions of the items above from the REALbasic documentation. | |||||
A FunctionNotFoundException is raised when a soft-declared external function is called. but cannot be loaded. This happens because either the library cannot be found, or the function cannot be found in the library.
[edit] Discussion
You can test for the availability of a function and library with the function System.IsFunctionAvailable.
[edit] Sample Code
To generate a FunctionNotFoundException, try the following code.
soft declare sub Foo lib "Carbon.framework" ()
Foo
The result should be a FunctionNotFoundException. Its Message property should read "Could not load Foo from Carbon.framework".
