@Sudha – what did you expect?
The script is trying to open the linked EPS file and reading out the first PostScript comment starting with the string "%%Baseline" to extract the substring after a whitespace followed by a substring that is not a whitespace.
What can go wrong with that:
1. There is no EPS file properly linked; so it cannot be opened.
2. If it is properly linked, the EPS file does not contain a readable PostScript comment
3. The PostScript comment is there, but does not contain a substring that could be converted to a number.
So you should test for all the above cases and react with an alert or something.
Uwe