How to use try to print a better call stack?

27 views
Skip to first unread message

Jeremiah Rounds

unread,
Oct 20, 2015, 3:33:41 PM10/20/15
to rhipe
Anyone know a trick to print a better call stack for Rhipe?   Some sort of finesse in the Map via tryCatch to dump the call stack?

Right now I am looking at this and thinking bah.  I got a try around foo(e$v), but I need just a little hit.  Pretty sure there is something missing from the environment as it runs locally.  (btw it is foo because it is actually a list of functions that are applying statistical algorithms to the map value).

There were R errors, showing 30:

1(11): 
R ERROR BEGIN (map):
=============

Error in foo(e$v) : object
Autokill is true and terminating job_1444548550266_0092
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl,  : 


Jeremiah Rounds

unread,
Oct 20, 2015, 3:36:28 PM10/20/15
to rhipe
I don't think it matters much but for context the full map looks like:


map = expression({
  for(i in seq_along(map.values)){
  v = map.values[[i]]
  k = map.keys[[i]]
 v = analytics$append.proportion(v)
 v = analytics$append.check_analytics_possible(v)
 silent=FALSE
 if(!v$analytics_possible)
   next
 e = NULL
 ret = try({gc()},silent=TRUE)
 e = new.env()
 e$v = v
 v = NULL
 for(foo in analytics){
   try({
     e$v = foo(e$v)
   }, silent=silent)
   
 }

 #return(v)
 v = e$v
 collect(k,v)
  }
})

Jeremiah Rounds

unread,
Oct 20, 2015, 3:42:02 PM10/20/15
to rhipe
No pressing need for an answer on this.  Followed my hunch that it was something missing in the environment and cleared out R and found a typo in a function that was causing it to get an argument from a global variable.

Still kind of interested in the answer though for future use. 


On Tuesday, October 20, 2015 at 12:33:41 PM UTC-7, Jeremiah Rounds wrote:

Jeremiah Rounds

unread,
Oct 20, 2015, 6:45:11 PM10/20/15
to rhipe
No edit on these google groups =) 

I remember what I used to do back in the day at Purdue.  I used to use the logical flags for errors and  collect the current environment as a key,value pair (key="error", value=environment()) and in that way I knew exactly what the problem was.  I forgot until this moment =)

Saptarshi Guha

unread,
Oct 20, 2015, 6:57:23 PM10/20/15
to rh...@googlegroups.com
you can also try , debug='collect', though the new RHIPE i hear has a nice debug feature. Ryan has more information

--

---
You received this message because you are subscribed to the Google Groups "rhipe" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rhipe+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages