@ardimedia/angular-portal-azure 0.2.197 → 0.2.198
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apn.d.ts +1 -0
- package/apn.js +23 -6
- package/package.json +1 -1
package/apn.d.ts
CHANGED
|
@@ -422,6 +422,7 @@ declare namespace angularportalazure {
|
|
|
422
422
|
static prepareException(response: angular.IHttpPromiseCallbackArg<angularportalazure.Exception> | any): angularportalazure.Exception;
|
|
423
423
|
private static processDotNetException1(response);
|
|
424
424
|
private static processDotNetException2(response);
|
|
425
|
+
private static setExceptionType(response, exception);
|
|
425
426
|
}
|
|
426
427
|
}
|
|
427
428
|
declare namespace angularportalazure {
|
package/apn.js
CHANGED
|
@@ -1378,7 +1378,7 @@ var angularportalazure;
|
|
|
1378
1378
|
}
|
|
1379
1379
|
//#endregion
|
|
1380
1380
|
//#region Methods
|
|
1381
|
-
// [any] will be [Response] in angular2
|
|
1381
|
+
// TODO:2017-01-09/hp: [any] will be [Response] in angular2
|
|
1382
1382
|
Exception.prepareException = function (response) {
|
|
1383
1383
|
console.log('convertException: input [angular.IHttpPromiseCallbackArg<angularportalazure.Exception>]');
|
|
1384
1384
|
console.log(response);
|
|
@@ -1400,7 +1400,7 @@ var angularportalazure;
|
|
|
1400
1400
|
exception = Exception.processDotNetException2(response.data);
|
|
1401
1401
|
exception.ExceptionMessage = response.json().ExceptionMessage;
|
|
1402
1402
|
exception.StackTrace = response.json().StackTrace;
|
|
1403
|
-
|
|
1403
|
+
Exception.setExceptionType(response, exception);
|
|
1404
1404
|
exception.Type = response.json().Type;
|
|
1405
1405
|
exception.Message = response.json().Message;
|
|
1406
1406
|
exception.MessageDetail = response.json().MessageDetail;
|
|
@@ -1419,7 +1419,7 @@ var angularportalazure;
|
|
|
1419
1419
|
};
|
|
1420
1420
|
Exception.processDotNetException1 = function (response) {
|
|
1421
1421
|
var exception = new angularportalazure.Exception();
|
|
1422
|
-
//#region
|
|
1422
|
+
//#region Convert data to Messages
|
|
1423
1423
|
exception.Messages = [];
|
|
1424
1424
|
var i = 1;
|
|
1425
1425
|
while (response.data[i + ''] !== undefined) {
|
|
@@ -1429,27 +1429,44 @@ var angularportalazure;
|
|
|
1429
1429
|
//#endregion
|
|
1430
1430
|
//#region Process DbEntityValidationException
|
|
1431
1431
|
if (response.data.ExceptionType === 'System.Data.Entity.Validation.DbEntityValidationException') {
|
|
1432
|
-
exception.
|
|
1432
|
+
exception.ExceptionType = 'DbEntityValidationException';
|
|
1433
1433
|
}
|
|
1434
1434
|
//#endregion
|
|
1435
1435
|
//#region Process DbUpdateConcurrencyException
|
|
1436
1436
|
if (response.data.ExceptionType === 'System.Data.Entity.Infrastructure.DbUpdateConcurrencyException') {
|
|
1437
|
-
exception.
|
|
1437
|
+
exception.ExceptionType = 'DbUpdateConcurrencyException';
|
|
1438
1438
|
}
|
|
1439
1439
|
//#endregion
|
|
1440
1440
|
//#region Process ValidationsException
|
|
1441
1441
|
// ClassName should by ExceptionType
|
|
1442
1442
|
if (response.data.ClassName.indexOf('ValidationsException') > 0) {
|
|
1443
|
-
exception.
|
|
1443
|
+
exception.ExceptionType = 'ValidationsException';
|
|
1444
1444
|
}
|
|
1445
1445
|
//#endregion
|
|
1446
1446
|
return exception;
|
|
1447
1447
|
};
|
|
1448
|
+
// TODO:2017-01-09/hp: Implement this function for angular2
|
|
1448
1449
|
Exception.processDotNetException2 = function (response) {
|
|
1449
1450
|
var exception = new angularportalazure.Exception();
|
|
1450
1451
|
console.log('[angularportalazure.Exception.processDotNetException2] not yet implemented.');
|
|
1451
1452
|
return exception;
|
|
1452
1453
|
};
|
|
1454
|
+
Exception.setExceptionType = function (response, exception) {
|
|
1455
|
+
if (response.data.ExceptionType === 'System.Data.Entity.Validation.DbEntityValidationException') {
|
|
1456
|
+
exception.ExceptionType = 'DbEntityValidationException';
|
|
1457
|
+
return;
|
|
1458
|
+
}
|
|
1459
|
+
else if (response.data.ExceptionType === 'System.Data.Entity.Infrastructure.DbUpdateConcurrencyException') {
|
|
1460
|
+
exception.ExceptionType = 'DbUpdateConcurrencyException';
|
|
1461
|
+
return;
|
|
1462
|
+
}
|
|
1463
|
+
else if (response.data.ClassName.indexOf('ValidationsException') > 0) {
|
|
1464
|
+
// ClassName should by ExceptionType
|
|
1465
|
+
exception.ExceptionType = 'ValidationsException';
|
|
1466
|
+
return;
|
|
1467
|
+
}
|
|
1468
|
+
exception.ExceptionType = response.data.ExceptionType;
|
|
1469
|
+
};
|
|
1453
1470
|
return Exception;
|
|
1454
1471
|
}(angularportalazure.ValidationsExceptionDotNet));
|
|
1455
1472
|
angularportalazure.Exception = Exception;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@ardimedia/angular-portal-azure",
|
|
3
3
|
"description": "Angular Portal Azure - GUI Framework.",
|
|
4
4
|
"author": "Ardimedia Anstalt <info@ardimedia.com> (http://www.ardimedia.com)",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.198",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"typings": "apn.d.ts",
|
|
8
8
|
"dependencies": {
|