aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/javascript/reference/global_objects/error/filename/index.html
blob: b85c202750441f90727123a9064487e440453642 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
title: Error.prototype.fileName
slug: Web/JavaScript/Reference/Global_Objects/Error/fileName
tags:
  - Error
  - JavaScript
  - Property
  - Prototype
translation_of: Web/JavaScript/Reference/Global_Objects/Error/fileName
---
<div>{{JSRef}} {{non-standard_header}}</div>

<p><code><strong>fileName</strong></code> プロパティは、このエラーを起こしたファイルへのパスを含みます。</p>

<h2 id="Description" name="Description">解説</h2>

<p>この標準外のプロパティは、このエラーを起こしたファイルへのパスが入ります。デバッガーのコンテキストから呼び出された場合、例えば Firefox 開発ツールでは、"debugger eval code" が返されます。</p>

<h2 id="Examples" name="Examples"></h2>

<h3 id="Using_fileName" name="Using_fileName">fileName の使用</h3>

<pre class="brush: js notranslate">var e = new Error('Could not parse input');
throw e;
// e.fileName could look like "file:///C:/example.html"
</pre>

<h2 id="Specifications" name="Specifications">仕様書</h2>

<p>仕様の一部ではありません。</p>

<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2>

<div>
<p>{{Compat("javascript.builtins.Error.fileName")}}</p>
</div>

<h2 id="See_also" name="See_also">関連情報</h2>

<ul>
 <li>{{jsxref("Error.prototype.stack")}}</li>
 <li>{{jsxref("Error.prototype.columnNumber")}}</li>
 <li>{{jsxref("Error.prototype.fileName")}}</li>
</ul>