aboutsummaryrefslogtreecommitdiff
path: root/files/pl/web/javascript/reference/global_objects/error/message
diff options
context:
space:
mode:
authorFlorian Merz <me@fiji-flo.de>2021-02-11 14:49:24 +0100
committerFlorian Merz <me@fiji-flo.de>2021-02-11 14:49:24 +0100
commitde5c456ebded0e038adbf23db34cc290c8829180 (patch)
tree2819c07a177bb7ec5f419f3f6a14270d6bcd7fda /files/pl/web/javascript/reference/global_objects/error/message
parent8260a606c143e6b55a467edf017a56bdcd6cba7e (diff)
downloadtranslated-content-de5c456ebded0e038adbf23db34cc290c8829180.tar.gz
translated-content-de5c456ebded0e038adbf23db34cc290c8829180.tar.bz2
translated-content-de5c456ebded0e038adbf23db34cc290c8829180.zip
unslug pl: move
Diffstat (limited to 'files/pl/web/javascript/reference/global_objects/error/message')
-rw-r--r--files/pl/web/javascript/reference/global_objects/error/message/index.html108
1 files changed, 108 insertions, 0 deletions
diff --git a/files/pl/web/javascript/reference/global_objects/error/message/index.html b/files/pl/web/javascript/reference/global_objects/error/message/index.html
new file mode 100644
index 0000000000..1f3983fa6b
--- /dev/null
+++ b/files/pl/web/javascript/reference/global_objects/error/message/index.html
@@ -0,0 +1,108 @@
+---
+title: Error.prototype.message
+slug: Web/JavaScript/Referencje/Obiekty/Error/message
+translation_of: Web/JavaScript/Reference/Global_Objects/Error/message
+---
+<div>{{JSRef}}</div>
+
+<p>Właściwość <code><strong>message</strong></code> jest komunikatem błędu zapisanym w sposób czytelny dla czlowieka.</p>
+
+<h2 id="Opis">Opis</h2>
+
+<p>Właściwość zawiera krótki opis błędu, jeśli jest dostępny, lub został ustawiony. <a href="/en-US/docs/Mozilla/Projects/SpiderMonkey">SpiderMonkey</a> szeroko wykorzystuje właściwość <code>message</code> w wyjątkach. Właściwość <code>message</code> jest używany, wraz z właściwością {{jsxref("Error.prototype.name", "name")}} przez metodę {{jsxref("Error.prototype.toString()")}} do tworzenia tekstowej reprezentacji obiektu Error.</p>
+
+<p>Domyślnie właściwość <code>message </code>jest pustym stringiem, ale to zachowanie może zostać nadpisane w instancji, poprzez przekazanie komunikatu jako pierwszy parametr do {{jsxref("Error", "Error constructor")}}.</p>
+
+<h2 id="Przykłady">Przykłady</h2>
+
+<h3 id="Rzucanie_ustawionego_błędu">Rzucanie ustawionego błędu</h3>
+
+<pre class="brush: js">var e = new Error('Could not parse input'); // e.message is 'Could not parse input'
+throw e;
+</pre>
+
+<h2 id="Specyfikacje">Specyfikacje</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES1')}}</td>
+ <td>{{Spec2('ES1')}}</td>
+ <td>Initial 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>
+ </tbody>
+</table>
+
+<h2 id="Kompatybilność_z_przeglądarkami">Kompatybilność z przeglądarkami</h2>
+
+<div>{{CompatibilityTable}}</div>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</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>Basic support</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="Zobacz_też">Zobacz też</h2>
+
+<ul>
+ <li>{{jsxref("Error.prototype.name")}}</li>
+ <li>{{jsxref("Error.prototype.toString()")}}</li>
+</ul>