aboutsummaryrefslogtreecommitdiff
path: root/files/ca/web/javascript/reference/global_objects/error/filename
diff options
context:
space:
mode:
Diffstat (limited to 'files/ca/web/javascript/reference/global_objects/error/filename')
-rw-r--r--files/ca/web/javascript/reference/global_objects/error/filename/index.html88
1 files changed, 88 insertions, 0 deletions
diff --git a/files/ca/web/javascript/reference/global_objects/error/filename/index.html b/files/ca/web/javascript/reference/global_objects/error/filename/index.html
new file mode 100644
index 0000000000..9d38712cf4
--- /dev/null
+++ b/files/ca/web/javascript/reference/global_objects/error/filename/index.html
@@ -0,0 +1,88 @@
+---
+title: Error.prototype.fileName
+slug: Web/JavaScript/Reference/Global_Objects/Error/fileName
+translation_of: Web/JavaScript/Reference/Global_Objects/Error/fileName
+original_slug: Web/JavaScript/Referencia/Objectes_globals/Error/fileName
+---
+<div>{{JSRef("Global_Objects", "Error", "EvalError,InternalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError")}} {{non-standard_header}}</div>
+
+<h2 id="Summary" name="Summary">Resum</h2>
+
+<p>La propietat <code><strong>fileName</strong></code> conté la ruta al fitxer que ha provocat aquest error.</p>
+
+<h2 id="Description" name="Description">Descripció</h2>
+
+<p>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".</p>
+
+<h2 id="Examples" name="Examples">Exemples</h2>
+
+<h3 id="Example:_Throwing_a_custom_error" name="Example:_Throwing_a_custom_error">Exemple: Utilitzar <code>fileName</code></h3>
+
+<pre class="brush: js">var e = new Error('Dades no tractades');
+throw e;
+// e.fileName podria contrindre quelcom semblant a "file:///C:/example.html"
+</pre>
+
+<h2 id="Especificacions.">Especificacions.</h2>
+
+<p>No format part de cap especificació. No és standard.</p>
+
+<h2 id="Compatibilitat_amb_navegadors">Compatibilitat amb navegadors</h2>
+
+<div>{{CompatibilityTable}}</div>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Característica</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Suport bàsic</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Característica</th>
+ <th>Android</th>
+ <th>Chrome for Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Suport bàsic</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="See_also" name="See_also">Vegeu també</h2>
+
+<ul>
+ <li>{{jsxref("Error.prototype.stack")}} {{non-standard_inline}}</li>
+ <li>{{jsxref("Error.prototype.columnNumber")}} {{non-standard_inline}}</li>
+ <li>{{jsxref("Error.prototype.lineNumber")}} {{non-standard_inline}}</li>
+</ul>