The getArg() prototype method of the Exception object can be used to get the value of a specified item in the exception's data arguments.
getArg()
MDN Reference