pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://developer.mozilla.org/es/docs/Web/JavaScript/Reference/Global_Objects/Error/lineNumber

2b8.js" type="module">

Esta página ha sido traducida del inglés por la comunidad. Aprende más y únete a la comunidad de MDN Web Docs.

View in English Always switch to English

Error.prototype.lineNumber

No es una norma

Esta característica no es una norma y no está en la lista de normas. No la utilice en sitios de producción que enfrenta la Web: no va a funcionar para todos los usuarios. También puede haber grandes incompatibilidades entre implementaciones y el comportamiento puede cambiar en el futuro.

La propiedad lineNumber contiene el número de linea en el archivo que arrojó el error.

Ejemplos

Utilizando lineNumber

js
var e = new Error("No fue posible analizar el dato introducido");
throw e;
console.log(e.lineNumber); // 2

Ejemplo alternativo utilizando el evento 'error'

js
window.addEventListener("error", function (e) {
  console.log(e.lineno); // 5
});
var e = new Error("No fue posible analizar el dato introducido");
throw e;

Esta es una norma soportada por Chrome, Firefox entre otros.

Especificaciones

No forma parte de ninguna especificación. No es una norma.

Compatibilidad con navegadores

Vea también

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy