Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Error.prototype.fileName

Non-standard
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

Resum

La propietat fileName conté la ruta al fitxer que ha provocat aquest error.

Descripció

Aquesta propietat no standard conté la ruta al fitxer que ha provocat l'error. Si es crida des d'un contexte de depuració, com ara des de Firefox Developer Tools, retorna "debugger eval code".

Exemples

Exemple: Utilitzar fileName

var e = new Error('Dades no tractades');
throw e;
// e.fileName podria contrindre quelcom semblant a "file:///C:/example.html"

Especificacions.

No format part de cap especificació. No és standard.

Compatibilitat amb navegadors

Característica Chrome Firefox (Gecko) Internet Explorer Opera Safari
Suport bàsic Not supported (Yes) Not supported Not supported Not supported
Característica Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Suport bàsic Not supported Not supported (Yes) Not supported Not supported Not supported

Vegeu també

Document Tags and Contributors

 Contributors to this page: teoli, enTropy
 Last updated by: teoli,