Skip to content
This repository was archived by the owner on Jan 27, 2019. It is now read-only.

Commit

Permalink
Merge pull request #149 from sebastianhaeni/master
Browse files Browse the repository at this point in the history
Log grammar
yck1509 committed Jan 6, 2015
2 parents 24a7fd8 + 7fa0617 commit d4c528a
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions Confuser.Core/ConfuserEngine.cs
Original file line number Diff line number Diff line change
@@ -162,22 +162,22 @@ static void RunInternal(ConfuserParameters parameters, CancellationToken token)
ok = true;
}
catch (AssemblyResolveException ex) {
context.Logger.ErrorException("Failed to resolve a assembly, check if all dependencies are of correct version.", ex);
context.Logger.ErrorException("Failed to resolve an assembly, check if all dependencies are present in the correct version.", ex);
PrintEnvironmentInfo(context);
}
catch (TypeResolveException ex) {
context.Logger.ErrorException("Failed to resolve a type, check if all dependencies are of correct version.", ex);
context.Logger.ErrorException("Failed to resolve a type, check if all dependencies are present in the correct version.", ex);
PrintEnvironmentInfo(context);
}
catch (MemberRefResolveException ex) {
context.Logger.ErrorException("Failed to resolve a member, check if all dependencies are of correct version.", ex);
context.Logger.ErrorException("Failed to resolve a member, check if all dependencies are present in the correct version.", ex);
PrintEnvironmentInfo(context);
}
catch (IOException ex) {
context.Logger.ErrorException("An IO error occurred, check if all input/output locations are read/writable.", ex);
context.Logger.ErrorException("An IO error occurred, check if all input/output locations are readable/writable.", ex);
}
catch (OperationCanceledException) {
context.Logger.Error("Operation is canceled.");
context.Logger.Error("Operation cancelled.");
}
catch (ConfuserException) {
// Exception is already handled/logged, so just ignore and report failure
@@ -265,7 +265,7 @@ static void Inspection(ConfuserContext context) {
if (snKey == null && module.IsStrongNameSigned)
context.Logger.WarnFormat("[{0}] SN Key is not provided for a signed module, the output may not be working.", module.Name);
else if (snKey != null && !module.IsStrongNameSigned)
context.Logger.WarnFormat("[{0}] SN Key is provided for a unsigned module, the output may not be working.", module.Name);
context.Logger.WarnFormat("[{0}] SN Key is provided for an unsigned module, the output may not be working.", module.Name);
else if (snKey != null && module.IsStrongNameSigned &&
!module.Assembly.PublicKey.Data.SequenceEqual(snKey.PublicKey))
context.Logger.WarnFormat("[{0}] Provided SN Key and signed module's public key do not match, the output may not be working.", module.Name);
6 changes: 3 additions & 3 deletions Confuser.Renamer/Analyzers/ResourceAnalyzer.cs
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ public void Analyze(ConfuserContext context, INameService service, IDnlibDef def
string nameAsmName = asmName.Substring(0, asmName.Length - ".resources".Length);
ModuleDef mainModule = context.Modules.SingleOrDefault(mod => mod.Assembly.Name == nameAsmName);
if (mainModule == null) {
context.Logger.ErrorFormat("Could not found main assembly of satellite assembly '{0}'.", module.Assembly.FullName);
context.Logger.ErrorFormat("Could not find main assembly of satellite assembly '{0}'.", module.Assembly.FullName);
throw new ConfuserException(null);
}

@@ -33,7 +33,7 @@ public void Analyze(ConfuserContext context, INameService service, IDnlibDef def
string typeName = match.Groups[1].Value;
TypeDef type = mainModule.FindReflectionThrow(typeName);
if (type == null) {
context.Logger.WarnFormat("Could not found resource type '{0}'.", typeName);
context.Logger.WarnFormat("Could not find resource type '{0}'.", typeName);
continue;
}
service.AddReference(type, new ResourceReference(res, type, format));
@@ -52,7 +52,7 @@ public void Analyze(ConfuserContext context, INameService service, IDnlibDef def

TypeDef type = module.FindReflection(typeName);
if (type == null) {
context.Logger.WarnFormat("Could not found resource type '{0}'.", typeName);
context.Logger.WarnFormat("Could not find resource type '{0}'.", typeName);
continue;
}
service.AddReference(type, new ResourceReference(res, type, format));

0 comments on commit d4c528a

Please sign in to comment.