Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

166
Vistas
What attributes are accessible for 'error' objects in Google Apps Script?

I am working on adding error handling into my Google Sheets based web app. After investigating try/catch blocks, it's clear that it would be best practice to specify what action to take depending on the exact nature of the error. I have begun testing with errors, but I am unable to find a complete resource that details exactly what attributes of the error can be utilized. For reference, here is the try/catch block in my test function:

try{
    var url = "jdbc:mysql://"+SERVER+":"+PORT+"/"+DB_DEV;
    var conn = Jdbc.getConnection(url, USERNAME, PASSWORD);

    // Sends connection to prepare SQL statements
    return conn;
  } catch(e){
    Logger.log(e);          
    Logger.log(e.stack);    // Valid
    Logger.log(e.message);  // Valid
    Logger.log(e.name);     // Valid

    Logger.log(e.type);     // Invalid

    return null;
  }

In the above example, "stack", "message", and "name" are all valid attributes, but I was only able to find them via trial and error looking through others' example code. My question is - could someone point me in the direction of a resource that would detail error objects in Google Apps Script?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Apps script uses a standard chrome v8 engine based on javascript. All standard properties of the javascript error object are available(i.e., name and message). Some non standard properties like stack is also available on the v8 engine.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda