Search notes:

JavaScript statements: try

<!DOCTYPE html>
<html>
<head>
  <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
  <title>Javascrtipt: try … catch statement</title>
</head>

<script type="text/javascript">
    
function main() {

  try {
    var i;
    i = inexstingFunction();
    alert(i);
  }
  catch (e) {
    alert(e); // ReferenceError: inexistingFunction is not defined
  }

}

</script>

<body onload='main();'></body>

</html>
Github repository about-javascript, path: /statements/try/try-catch.html

See also

Javacript statements

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758207103, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/JavaScript/language/statements/try/index(64): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78