Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding new kind of action which is performed in response to the error. #20

Merged
merged 2 commits into from Mar 5, 2016

Conversation

NeoAnomaly
Copy link
Contributor

Related to #17

…. The BTA_CUSTOM allows to specify custom handler that called at processing BugTrap action.
@bchavez
Copy link
Owner

bchavez commented Mar 4, 2016

Hi @NeoAnomaly , thanks very much for your PR. This looks like a reasonable addition.

I wanted to reach out to you and ask if you could also make the .NET/managed version include the changes your PR.

I checked the CI build output for this PR (BugTrapDN.dll) and found enum ActivityType still having MailReport, SaveReport, SendReport, and ShowUI. I don't see a new Custom value with an ability to register a callback in the .NET/managed version of BugTrap.

If you could make the .NET version match up with the changes you made in the native version of BugTrap, that would be really great!

Let me know your thoughts. Thanks!

screen629

…(for managed version). The ActivityType.Custom allows to specify custom handler that called at processing BugTrap action
@NeoAnomaly
Copy link
Contributor Author

Hi @bchavez. I tried to made suitable changes for managed version. At first glance nothing complicated. But it would be better if someone who knows/works with c++/cli reviewed changes before merging.

Example usage(C#):

class Program
    {
        static void Main(string[] args)
        {
            ExceptionHandler.AppName = "Your application name";
            ExceptionHandler.Flags = FlagsType.DetailedMode;
            ExceptionHandler.DumpType = MinidumpType.Normal;

            ExceptionHandler.Activity = ActivityType.Custom;
            ExceptionHandler.CustomActivity += ExceptionHandler_CustomActivity;

            throw new NotImplementedException("My test exception");
        }

        private static void ExceptionHandler_CustomActivity(object sender, string reportFilePath)
        {
            Console.WriteLine(reportFilePath);
            Console.ReadLine();
        }
    }

@bchavez
Copy link
Owner

bchavez commented Mar 4, 2016

Hi @NeoAnomaly , this looks great! Thanks so much for getting the managed version up to feature parity with your PR.

It looks good to me. I'll probably wait until the end of day before merging your code to give others a chance to review this PR.

If we don't have any objections, we'll merge tonight (Los Angeles/Pacific Time) and publish a fresh build of your changes.

Again, thank you for your contribution! Great work m8!

@gvanem
Copy link

gvanem commented Mar 4, 2016

Related to #17

Good!

bchavez added a commit that referenced this pull request Mar 5, 2016
Adding new kind of action which is performed in response to the error.
@bchavez bchavez merged commit 34b1646 into bchavez:master Mar 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants