I started using xmp to compare and control file versions.
If the file is fresh new, it doesn't have any value to return through XMPtool.read( ), giving me an error.
What i did here to solve this, was:
instead of returning:
return xmp.getProperty(this.ns, prop).toString();
I Made it return this condition:
return (xmp.getProperty(this.ns, prop)) ? xmp.getProperty(this.ns, prop).toString() : null;
I started using xmp to compare and control file versions.
If the file is fresh new, it doesn't have any value to return through XMPtool.read( ), giving me an error.
What i did here to solve this, was:
instead of returning:
return xmp.getProperty(this.ns, prop).toString();I Made it return this condition:
return (xmp.getProperty(this.ns, prop)) ? xmp.getProperty(this.ns, prop).toString() : null;