| Author | 
         | 
         
      
        
         
         jeffw_00 Super User 
          
 
  Joined: June 30 2007
 Online Status: Offline Posts: 935
          | 
        
         
          
           | Posted: July 30 2017 at 17:38 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Hi - Sometimes I look through my event log and find that a Macro has a syntax error, or I'm trying to perform a function on a module (Unit) that I deleted.
 
 Is there a way to program Powerhome such that "if error is detected while executing command then trigger <macro>"  then I can write a macro that sends me an Email.   (and use the time of the Email to find the error in the log). 
 
 Any way to do this?
 
 Thanks!
 /j
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         gg102 Senior Member 
          
 
  Joined: January 29 2013 Location: United States
 Online Status: Offline Posts: 246
          | 
        
         
          
           | Posted: July 31 2017 at 17:11 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Hi Jeffw,
 
 I remember something about this topic.  As I recall 
 someone (probably Dave) mentioned that this would be 
 dangerous because if the macro that you call upon error 
 detecting has itself an error, you'd be stuck in a loop.
 
 
 
 
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         jeffw_00 Super User 
          
 
  Joined: June 30 2007
 Online Status: Offline Posts: 935
          | 
        
         
          
           | Posted: July 31 2017 at 17:19 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
so disable the feature for that specific macro
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         gg102 Senior Member 
          
 
  Joined: January 29 2013 Location: United States
 Online Status: Offline Posts: 246
          | 
        
         
          
           | Posted: July 31 2017 at 17:44 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Yeah, I agree, you'll have to search the forum for the 
 original thread and discussion.  It was a while ago....
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         dhoward Admin Group 
          
  
  Joined: June 29 2001 Location: United States
 Online Status: Offline Posts: 4447
          | 
        
         
          
           | Posted: November 09 2017 at 12:04 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
I'll take a look at this. Im thinking of a trigger that 
 can be fired on specific error conditions. There would be 
 no way I could catch every error but I should be able to 
 do the ones that at least go to the log or pop a critical 
 error.
 
 Dave.
 
         | 
       
       
        | Back to Top | 
         
          
          
         | 
       
       
       
        |   | 
      
        
         
         jeffw_00 Super User 
          
 
  Joined: June 30 2007
 Online Status: Offline Posts: 935
          | 
        
         
          
           | Posted: November 09 2017 at 16:06 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
That would be great.  When I code for my day job, I pick up a lot of errors by tkdiffing to the old code.  Can't do this with PH so errors creep in.  A flagging mechanism would be awesome. 
  Edited by jeffw_00 - November 09 2017 at 16:08
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         gg102 Senior Member 
          
 
  Joined: January 29 2013 Location: United States
 Online Status: Offline Posts: 246
          | 
        
         
          
           | Posted: November 09 2017 at 16:19 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Dave,
 
 On this one, if there's an error, it would be totally useful to have visibility to the macro name ( and parent macro 
 if it's a sub-macro) and the line number.  The more the merrier.....
 
 Maybe you could make new SYSTEM Vars for this.....
 
 Just a thought.
 
 
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   |