Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: PH trigger Macro when Error(e.g.,syntax)? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
jeffw_00
Super User
Super User


Joined: June 30 2007
Online Status: Offline
Posts: 929
Posted: July 30 2017 at 17:38 | IP Logged Quote jeffw_00

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 View jeffw_00's Profile Search for other posts by jeffw_00
 
gg102
Senior Member
Senior Member


Joined: January 29 2013
Location: United States
Online Status: Offline
Posts: 245
Posted: July 31 2017 at 17:11 | IP Logged Quote gg102

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 View gg102's Profile Search for other posts by gg102
 
jeffw_00
Super User
Super User


Joined: June 30 2007
Online Status: Offline
Posts: 929
Posted: July 31 2017 at 17:19 | IP Logged Quote jeffw_00

so disable the feature for that specific macro
Back to Top View jeffw_00's Profile Search for other posts by jeffw_00
 
gg102
Senior Member
Senior Member


Joined: January 29 2013
Location: United States
Online Status: Offline
Posts: 245
Posted: July 31 2017 at 17:44 | IP Logged Quote gg102

Yeah, I agree, you'll have to search the forum for the
original thread and discussion. It was a while ago....
Back to Top View gg102's Profile Search for other posts by gg102
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: November 09 2017 at 12:04 | IP Logged Quote dhoward

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 View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
jeffw_00
Super User
Super User


Joined: June 30 2007
Online Status: Offline
Posts: 929
Posted: November 09 2017 at 16:06 | IP Logged Quote jeffw_00

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 View jeffw_00's Profile Search for other posts by jeffw_00
 
gg102
Senior Member
Senior Member


Joined: January 29 2013
Location: United States
Online Status: Offline
Posts: 245
Posted: November 09 2017 at 16:19 | IP Logged Quote gg102

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 View gg102's Profile Search for other posts by gg102
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum