diff options
| author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:41:15 -0500 |
|---|---|---|
| committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:41:15 -0500 |
| commit | 4b1a9203c547c019fc5398082ae19a3f3d4c3efe (patch) | |
| tree | d4a40e13ceeb9f85479605110a76e7a4d5f3b56b /files/de/web/javascript/reference/global_objects/error/linenumber | |
| parent | 33058f2b292b3a581333bdfb21b8f671898c5060 (diff) | |
| download | translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.gz translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.bz2 translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.zip | |
initial commit
Diffstat (limited to 'files/de/web/javascript/reference/global_objects/error/linenumber')
| -rw-r--r-- | files/de/web/javascript/reference/global_objects/error/linenumber/index.html | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/files/de/web/javascript/reference/global_objects/error/linenumber/index.html b/files/de/web/javascript/reference/global_objects/error/linenumber/index.html new file mode 100644 index 0000000000..63bb6a59c2 --- /dev/null +++ b/files/de/web/javascript/reference/global_objects/error/linenumber/index.html @@ -0,0 +1,55 @@ +--- +title: Error.prototype.lineNumber +slug: Web/JavaScript/Reference/Global_Objects/Error/lineNumber +tags: + - Error + - JavaScript + - Non-standard + - Property + - Prototype + - Reference +translation_of: Web/JavaScript/Reference/Global_Objects/Error/lineNumber +--- +<div>{{JSRef}} {{non-standard_header}}</div> + +<p>Die <code><strong>lineNumber</strong></code> Eigenschaft enthält die Zeilennummer in der Datei, in der der Fehler erzeugt wurde.</p> + +<h2 id="Beispiele">Beispiele</h2> + +<h3 id="Einsatz_von_lineNumber">Einsatz von <code>lineNumber</code></h3> + +<pre class="brush: js">var e = new Error('Could not parse input'); +throw e; +console.log(e.lineNumber) // 2 +</pre> + +<h3 id="Alternatives_Beispiel_mit_error_Events">Alternatives Beispiel mit <code>error</code> Events</h3> + +<pre class="brush: js">window.addEventListener('error', function(e) { + console.log(e.lineNumber); // 5 +}); +var e = new Error('Could not parse input'); +throw e; +</pre> + +<p>Das ist keine Standardfunktion und es gibt auch keine breite Unterstützung (siehe Browserkompatibilitätstabelle unten).</p> + +<h2 id="Spezifikationen">Spezifikationen</h2> + +<p>Ist in keiner Spezifikation enthalten. Kein Standard.</p> + +<h2 id="Browserkompatibilität">Browserkompatibilität</h2> + +<div> + + +<p>{{Compat("javascript.builtins.Error.lineNumber")}}</p> +</div> + +<h2 id="Siehe_auch">Siehe auch</h2> + +<ul> + <li>{{jsxref("Error.prototype.stack")}} {{non-standard_inline}}</li> + <li>{{jsxref("Error.prototype.columnNumber")}} {{non-standard_inline}}</li> + <li>{{jsxref("Error.prototype.fileName")}} {{non-standard_inline}}</li> +</ul> |
