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

#7: VMWareTasks.proj's vixcom target needs to be updated to use Visual Studio 2005's tlbimp.exe #8

Closed
wants to merge 5 commits into from

Conversation

icnocop
Copy link
Collaborator

@icnocop icnocop commented Nov 1, 2012

#7: VMWareTasks.proj's vixcom target needs to be updated to use Visual Studio 2005's tlbimp.exe

  • Throwing some more meaningful exceptions

…ual Studio 2005's tlbimp.exe

* Throwing some more meaningful exceptions
@dblock
Copy link
Owner

dblock commented Nov 1, 2012

I am generally against mapping any single error thrown by VMWare to a specific exception. That will grow to some huge number of errors, no? The next thing people will be asking why aren't all of them wrapped ;)

@icnocop
Copy link
Collaborator Author

icnocop commented Nov 3, 2012

I think this library would be better if it has more specific exceptions because it would allow for callers to catch and handle specific exceptions that they are only really interested in instead of a generic exception that could have many meanings.

We can derive all the specific exceptions from VMWareException so that the changes are backward compatible for example. We can also tailor the specific error messages like this:

public VMWareFileNotFoundException(string fileName)
: base(string.Format("The file cannot be found: {0}", fileName))
{}

instead of wrapping the underlying string from the VIX API.

Yes, the number of exceptions can potentially grow to be the same number of error codes in the VIX API, which is around 263 (v1.12). However, we certainly don't have to implement all of them (especially right away), but only if\when they are requested\needed, and only those that may be thrown from the VIX API methods that the library calls.

Here is a related work item:
http://vmwaretasks.codeplex.com/workitem/1627

@dblock
Copy link
Owner

dblock commented Nov 3, 2012

I would be happy to take a commit that derives specific exceptions from VMWareException. You might want to split the tlbimp stuff from this too just to clear the plate a bit.

@icnocop
Copy link
Collaborator Author

icnocop commented Jan 9, 2013

Sorry, I'm not sure how to tell git to ignore the changes in VMWareException.cs in this pull request. Any advice? It seems it's mainly because I had moved it to another folder, and now I am trying to move it back, but it was never moved in the original repository. Thank you.

@dblock
Copy link
Owner

dblock commented Jan 9, 2013

It's weird. Want to open a new clean PR from a new branch so that we don't have all that exception stuff in it?

@icnocop
Copy link
Collaborator Author

icnocop commented Jan 15, 2013

Closing pull request in lieu of new pull request #10

@icnocop icnocop closed this Jan 15, 2013
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

2 participants