aboutsummaryrefslogtreecommitdiff
path: root/files/de/web/javascript/reference/global_objects/error/message
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:41:15 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:41:15 -0500
commit4b1a9203c547c019fc5398082ae19a3f3d4c3efe (patch)
treed4a40e13ceeb9f85479605110a76e7a4d5f3b56b /files/de/web/javascript/reference/global_objects/error/message
parent33058f2b292b3a581333bdfb21b8f671898c5060 (diff)
downloadtranslated-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/message')
-rw-r--r--files/de/web/javascript/reference/global_objects/error/message/index.html75
1 files changed, 75 insertions, 0 deletions
diff --git a/files/de/web/javascript/reference/global_objects/error/message/index.html b/files/de/web/javascript/reference/global_objects/error/message/index.html
new file mode 100644
index 0000000000..559f457cb2
--- /dev/null
+++ b/files/de/web/javascript/reference/global_objects/error/message/index.html
@@ -0,0 +1,75 @@
+---
+title: Error.prototype.message
+slug: Web/JavaScript/Reference/Global_Objects/Error/message
+tags:
+ - Error
+ - JavaScript
+ - Property
+ - Prototype
+translation_of: Web/JavaScript/Reference/Global_Objects/Error/message
+---
+<div>{{JSRef}}</div>
+
+<p>Die <code><strong>message</strong></code> Eigenschaft ist eine für Menschen lesbare Beschreibung von Errors.</p>
+
+<h2 id="Beschreibung">Beschreibung</h2>
+
+<p>Diese Eigenschaft enthält eine knappe Beschreibung des Errors, wenn eine verfügbar ist oder gesetzt wird. Zum Beispiel setzt <a href="/de/docs/Mozilla/Projects/SpiderMonkey">SpiderMonkey</a> diese Eigenschaft sehr oft ein. Die <code>message</code> Eigenschaft kombiniert mit der {{jsxref("Error.prototype.name", "name")}} Eigenschaft werden in der {{jsxref("Error.prototype.toString()")}} Methode eingesetzt, um eine String-Repräsentation des Errors zu erstellen.</p>
+
+<p>Der Standardwert für die <code>message</code> Eigenschaft ist ein leerer String, jedoch kann diese von einer Instanz überschrieben werden, indem der erste Parameter des  {{jsxref("Error", "Error Konstruktors")}} gesetzt wird.</p>
+
+<h2 id="Beispiele">Beispiele</h2>
+
+<h3 id="Einen_benutzerdefinierten_Fehler_erzeugen">Einen benutzerdefinierten Fehler erzeugen</h3>
+
+<pre class="brush: js">var e = new Error('Falsches Eingabeformat');
+// e.message ist 'Falsches Eingabeformat'
+throw e;
+</pre>
+
+<h2 id="Spezifikationen">Spezifikationen</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Spezifikation</th>
+ <th scope="col">Status</th>
+ <th scope="col">Kommentar</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES1')}}</td>
+ <td>{{Spec2('ES1')}}</td>
+ <td>Initiale Definition.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.11.4.3', 'Error.prototype.message')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-error.prototype.message', 'Error.prototype.message')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-error.prototype.message', 'Error.prototype.message')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browserkompatibilität">Browserkompatibilität</h2>
+
+<div>
+
+
+<p>{{Compat("javascript.builtins.Error.message")}}</p>
+</div>
+
+<h2 id="Siehe_auch">Siehe auch</h2>
+
+<ul>
+ <li>{{jsxref("Error.prototype.name")}}</li>
+ <li>{{jsxref("Error.prototype.toString()")}}</li>
+</ul>