Media_GetLastError
Media_GetLastError will return error text for error in the last MediaManager’s function used. This function is useful when a container is returned and a second return value is necessary.
Returns
Error code of the last operation. The returned value consists of a dollar sign, error code, colon, and a textual information.
When there is no error, the function returns 0 (zero) for the error code:
$0:Media_GetVideoInfo: No error.
When there is an error, the function sets the error code to a nonzero number and provides an explanation of the cause, if possible:
$-35:Media_GetVideoInfo: No such volume. Could not get parameter #1 as movie.
Examples
Get information about file.mp4 located on your Desktop. If the function fails, an error dialog is shown to the user.
Set Field [ MyTable::Container ;
Media_GetVideoInfo ( "file:.D/file.mp4" ) ]
If [ not PatternCount ( Media_GetLastError; "$0:" ) ]
Beep
Show Custom Dialog [ "Media_GetVideoInfo" ;
"Failed with error " & Media_GetLastError ]
End If