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

CodeGeneratorInstanceCreationError: Move the inner exception #1772

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/Scaffolding/VS.Web.CG.Core/CodeGeneratorDescriptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ public virtual object CodeGeneratorInstance
}
catch (Exception ex)
{
throw new InvalidOperationException(string.Format(MessageStrings.CodeGeneratorInstanceCreationError, _codeGeneratorType.FullName, ex.Message));
throw
new InvalidOperationException
(string.Format(MessageStrings.CodeGeneratorInstanceCreationError, _codeGeneratorType.FullName), ex);
}

return instance;
Expand All @@ -104,4 +106,4 @@ private bool IsValidAction(MethodInfo method)
return true;
}
}
}
}
4 changes: 2 additions & 2 deletions src/Scaffolding/VS.Web.CG.Core/MessageStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
<value>Adding dependency '{0}' version '{1}'.</value>
</data>
<data name="CodeGeneratorInstanceCreationError" xml:space="preserve">
<value>There was an error creating the code generator instance: {0}\r\n{1}</value>
<value>There was an error creating the code generator instance: {0}</value>
</data>
<data name="CodeGeneratorNotFound" xml:space="preserve">
<value>No code generators found with the name '{0}'</value>
Expand Down Expand Up @@ -174,4 +174,4 @@
<data name="UnexpectedTypeLibraryForTemplates" xml:space="preserve">
<value>Unexpected type of library information for template folders</value>
</data>
</root>
</root>