Sign In Register

How can we help you today?

Start a new topic
Answered

Stack trace - cloud code

Hi,

is it possible to get stack trace in cloud code? I mean I have function and in its body I'd like to do something with stack trace string (like write part of it to some collection).

As I've seen, usually in js theres new Error().stack but in GS cloud code I dont have that kind of possibility.


Best Answer

Hi Marcin,


You can achieve this with Spark.currentStack() in Cloud Code. Please try that and let me know if it suits your needs.


Regards,

Liam


Answer

Hi Marcin,


You can achieve this with Spark.currentStack() in Cloud Code. Please try that and let me know if it suits your needs.


Regards,

Liam


1 person likes this
Thank you, this helped !
Btw, I dont see this in documentation - is it something new?

 

Hi Marcin, 


It's there it's just undocumented at the moment. We'll look into getting it added in a future update.


Regards,

Liam


1 person likes this

 Heya, just a 12 month follow up -- it's still not in intellisense or documented. Just letting you know :)

Login to post a comment