@@ -71,7 +71,7 @@ public static void RegisterLicense(string licenseKeyText)
71
71
public static void RegisterLicenseFromFile ( string filePath )
72
72
{
73
73
if ( ! filePath . FileExists ( ) )
74
- throw new LicenseException ( "License file does not exist: " + filePath ) ;
74
+ throw new LicenseException ( "License file does not exist: " + filePath ) . Trace ( ) ;
75
75
76
76
var licenseKeyText = filePath . ReadAllText ( ) ;
77
77
LicenseUtils . RegisterLicense ( licenseKeyText ) ;
@@ -145,7 +145,7 @@ public static void AssertEvaluationLicense()
145
145
{
146
146
if ( DateTime . UtcNow > new DateTime ( 2013 , 12 , 31 ) )
147
147
throw new LicenseException ( "The evaluation license for this software has expired. " +
148
- "See https://servicestack.net to upgrade to a valid license." ) ;
148
+ "See https://servicestack.net to upgrade to a valid license." ) . Trace ( ) ;
149
149
}
150
150
151
151
private static LicenseKey __activatedLicense ;
@@ -166,7 +166,7 @@ public static void RegisterLicense(string licenseKeyText)
166
166
var releaseDate = Env . GetReleaseDate ( ) ;
167
167
if ( releaseDate > key . Expiry )
168
168
throw new LicenseException ( "This license has expired on {0} and is not valid for use with this release."
169
- . Fmt ( key . Expiry . ToString ( "d" ) ) + ContactDetails ) ;
169
+ . Fmt ( key . Expiry . ToString ( "d" ) ) + ContactDetails ) . Trace ( ) ;
170
170
171
171
__activatedLicense = key ;
172
172
}
@@ -179,7 +179,7 @@ public static void RegisterLicense(string licenseKeyText)
179
179
if ( ! string . IsNullOrEmpty ( cutomerId ) )
180
180
msg += " The id for this license is '{0}'" . Fmt ( cutomerId ) ;
181
181
182
- throw new LicenseException ( msg ) ;
182
+ throw new LicenseException ( msg ) . Trace ( ) ;
183
183
}
184
184
}
185
185
@@ -201,7 +201,7 @@ public static void ApprovedUsage(LicenseFeature licenseFeature, LicenseFeature r
201
201
return ;
202
202
203
203
if ( actualUsage > allowedUsage )
204
- throw new LicenseException ( message . Fmt ( allowedUsage ) ) ;
204
+ throw new LicenseException ( message . Fmt ( allowedUsage ) ) . Trace ( ) ;
205
205
}
206
206
207
207
public static bool HasLicensedFeature ( LicenseFeature feature )
@@ -283,7 +283,7 @@ public static void AssertValidUsage(LicenseFeature feature, QuotaType quotaType,
283
283
break ;
284
284
}
285
285
286
- throw new LicenseException ( "Unknown Quota Usage: {0}, {1}" . Fmt ( feature , quotaType ) ) ;
286
+ throw new LicenseException ( "Unknown Quota Usage: {0}, {1}" . Fmt ( feature , quotaType ) ) . Trace ( ) ;
287
287
}
288
288
289
289
public static LicenseFeature GetLicensedFeatures ( this LicenseKey key )
@@ -310,7 +310,7 @@ public static LicenseFeature GetLicensedFeatures(this LicenseKey key)
310
310
case LicenseType . RedisBusiness :
311
311
return LicenseFeature . RedisSku ;
312
312
}
313
- throw new ArgumentException ( "Unknown License Type: " + key . Type ) ;
313
+ throw new ArgumentException ( "Unknown License Type: " + key . Type ) . Trace ( ) ;
314
314
}
315
315
316
316
public static LicenseKey ToLicenseKey ( this string licenseKeyText )
@@ -323,7 +323,7 @@ public static LicenseKey ToLicenseKey(this string licenseKeyText)
323
323
var key = jsv . FromJsv < LicenseKey > ( ) ;
324
324
325
325
if ( key . Ref != refId )
326
- throw new LicenseException ( "The license '{0}' is not assigned to CustomerId '{1}'." . Fmt ( base64 ) ) ;
326
+ throw new LicenseException ( "The license '{0}' is not assigned to CustomerId '{1}'." . Fmt ( base64 ) ) . Trace ( ) ;
327
327
328
328
return key ;
329
329
}
@@ -385,7 +385,7 @@ public static IDisposable RequestAccess(object accessToken, LicenseFeature srcFe
385
385
var accessType = accessToken . GetType ( ) ;
386
386
387
387
if ( srcFeature != LicenseFeature . Client || requestedAccess != LicenseFeature . Text || accessToken == null )
388
- throw new LicenseException ( ErrorMessages . UnauthorizedAccessRequest ) ;
388
+ throw new LicenseException ( ErrorMessages . UnauthorizedAccessRequest ) . Trace ( ) ;
389
389
390
390
if ( accessType . Name == "AccessToken" && accessType . GetAssembly ( ) . ManifestModule . Name . StartsWith ( "<" ) ) //Smart Assembly
391
391
return new AccessToken ( requestedAccess ) ;
@@ -396,7 +396,7 @@ public static IDisposable RequestAccess(object accessToken, LicenseFeature srcFe
396
396
accessType . Name ,
397
397
accessType . GetAssembly ( ) . ManifestModule . Name ) ;
398
398
399
- throw new LicenseException ( ErrorMessages . UnauthorizedAccessRequest + errorDetails ) ;
399
+ throw new LicenseException ( ErrorMessages . UnauthorizedAccessRequest + errorDetails ) . Trace ( ) ;
400
400
}
401
401
402
402
PclExport . Instance . VerifyInAssembly ( accessType , _approved . __dlls ) ;
0 commit comments