Skip to content

Conversation

@yugangw-msft
Copy link
Contributor

@yugangw-msft yugangw-msft commented Jan 3, 2018

It is one of the options to address test breaks tracked by Azure/azure-cli#5032
The other option is to have test sdk workaround by adding a new patch, but we still need an extraction here say, to a method, so tests can mock.

//CC @troydai @tjprescott @derekbekoe

Copy link
Contributor

@derekbekoe derekbekoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a minor breaking change so would require a minor version bump.
LGTM though if it would help in az.

knack/cli.py Outdated
def exception_handler(self, ex): # pylint: disable=no-self-use
""" The default exception handler for unknown CLI exceptions. """
logger.exception(ex)
""" The default exception handler"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can you add a space after handler?

@troydai
Copy link
Contributor

troydai commented Jan 25, 2018

Made change for ya. I will merge it when the CI passes.

@troydai
Copy link
Contributor

troydai commented Jan 25, 2018

@derekbekoe do you approve this?

@derekbekoe derekbekoe changed the title Consolidate exception handling so tests can capture the right exception [minor breaking change] Consolidate exception handling so tests can capture the right exception Jan 25, 2018
@derekbekoe derekbekoe merged commit c3db3a0 into microsoft:master Jan 25, 2018
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.

3 participants