@ardimedia/angular-portal-azure 0.2.195 → 0.2.197
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 +3 -2
- package/apn.js +34 -10
- package/package.json +1 -1
package/apn.d.ts
CHANGED
|
@@ -419,8 +419,9 @@ declare namespace angularportalazure {
|
|
|
419
419
|
Status: number | undefined;
|
|
420
420
|
StatusText: string | undefined;
|
|
421
421
|
Url: string;
|
|
422
|
-
static prepareException(response: angular.IHttpPromiseCallbackArg<angularportalazure.Exception>): angularportalazure.Exception;
|
|
423
|
-
private static
|
|
422
|
+
static prepareException(response: angular.IHttpPromiseCallbackArg<angularportalazure.Exception> | any): angularportalazure.Exception;
|
|
423
|
+
private static processDotNetException1(response);
|
|
424
|
+
private static processDotNetException2(response);
|
|
424
425
|
}
|
|
425
426
|
}
|
|
426
427
|
declare namespace angularportalazure {
|
package/apn.js
CHANGED
|
@@ -1378,18 +1378,37 @@ var angularportalazure;
|
|
|
1378
1378
|
}
|
|
1379
1379
|
//#endregion
|
|
1380
1380
|
//#region Methods
|
|
1381
|
+
// [any] will be [Response] in angular2
|
|
1381
1382
|
Exception.prepareException = function (response) {
|
|
1382
1383
|
console.log('convertException: input [angular.IHttpPromiseCallbackArg<angularportalazure.Exception>]');
|
|
1383
1384
|
console.log(response);
|
|
1384
|
-
var exception = Exception
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1385
|
+
var exception = new angularportalazure.Exception();
|
|
1386
|
+
if (response.headers === undefined) {
|
|
1387
|
+
exception = Exception.processDotNetException1(response.data);
|
|
1388
|
+
exception.ExceptionMessage = response.data.ExceptionMessage;
|
|
1389
|
+
exception.StackTrace = response.data.StackTrace;
|
|
1390
|
+
exception.ExceptionType = response.data.ExceptionType;
|
|
1391
|
+
exception.Type = response.data.Type;
|
|
1392
|
+
exception.Message = response.data.Message;
|
|
1393
|
+
exception.MessageDetail = response.data.MessageDetail;
|
|
1394
|
+
exception.Messages = response.data.Messages;
|
|
1395
|
+
exception.Url = response.config.url;
|
|
1396
|
+
exception.Status = response.status;
|
|
1397
|
+
exception.StatusText = response.statusText;
|
|
1398
|
+
}
|
|
1399
|
+
else {
|
|
1400
|
+
exception = Exception.processDotNetException2(response.data);
|
|
1401
|
+
exception.ExceptionMessage = response.json().ExceptionMessage;
|
|
1402
|
+
exception.StackTrace = response.json().StackTrace;
|
|
1403
|
+
exception.ExceptionType = response.json().ExceptionType;
|
|
1404
|
+
exception.Type = response.json().Type;
|
|
1405
|
+
exception.Message = response.json().Message;
|
|
1406
|
+
exception.MessageDetail = response.json().MessageDetail;
|
|
1407
|
+
exception.Messages = response.json().Messages;
|
|
1408
|
+
exception.Url = response.url;
|
|
1409
|
+
exception.Status = response.status;
|
|
1410
|
+
exception.StatusText = response.statusText;
|
|
1411
|
+
}
|
|
1393
1412
|
//// Find a better way to log information, maybe to the database or to Google Analytics.
|
|
1394
1413
|
//console.log('processException:');
|
|
1395
1414
|
//console.log(response);
|
|
@@ -1398,7 +1417,7 @@ var angularportalazure;
|
|
|
1398
1417
|
console.log(exception);
|
|
1399
1418
|
return exception;
|
|
1400
1419
|
};
|
|
1401
|
-
Exception.
|
|
1420
|
+
Exception.processDotNetException1 = function (response) {
|
|
1402
1421
|
var exception = new angularportalazure.Exception();
|
|
1403
1422
|
//#region Process data to Messages
|
|
1404
1423
|
exception.Messages = [];
|
|
@@ -1426,6 +1445,11 @@ var angularportalazure;
|
|
|
1426
1445
|
//#endregion
|
|
1427
1446
|
return exception;
|
|
1428
1447
|
};
|
|
1448
|
+
Exception.processDotNetException2 = function (response) {
|
|
1449
|
+
var exception = new angularportalazure.Exception();
|
|
1450
|
+
console.log('[angularportalazure.Exception.processDotNetException2] not yet implemented.');
|
|
1451
|
+
return exception;
|
|
1452
|
+
};
|
|
1429
1453
|
return Exception;
|
|
1430
1454
|
}(angularportalazure.ValidationsExceptionDotNet));
|
|
1431
1455
|
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.197",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"typings": "apn.d.ts",
|
|
8
8
|
"dependencies": {
|