The API function 'resource_info' logs an error message in the AM log file if the resource is not found in the 'resources' folder. But this is not an ERROR.
As the WIKI states explicitely, a use case of the function is to 'check if a resource exists' .
If the resource does not exist, the function returns 'nil', and one can handle the case in code.
I suggest to remove the logging in this case.
Paul
API Function 'resource_info' Logs an Error for a Missing Resource
-
- Posts: 236
- Joined: Sun Feb 14, 2021 6:55 pm
Re: API Function 'resource_info' Logs an Error for a Missing Resource
Hi,
Good point, will fix this in the next release of AM.
Thanks for pointing this out,
Corjan
Good point, will fix this in the next release of AM.
Thanks for pointing this out,
Corjan
Re: API Function 'resource_info' Logs an Error for a Missing Resource
Hi,
Fixed, and will be part of upcoming AM 4.1.4 build.
Corjan
Fixed, and will be part of upcoming AM 4.1.4 build.
Corjan
-
- Posts: 236
- Joined: Sun Feb 14, 2021 6:55 pm
Re: API Function 'resource_info' Logs an Error for a Missing Resource
Well done. Appreciate that.
Paul
Paul