Skip to content

Commit 1cc1751

Browse files
committed
2.7.0
1 parent 74c62ad commit 1cc1751

23 files changed

+140
-65
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
v2.7.0 - August 26, 2016
2+
3+
* 2.7.0 (Jeff Tan)
4+
* Issue #159: Added setErrorHandler to override default error handling (Rey)
5+
16
v2.6.0 - July 13, 2016
27

38
* 2.6.0 (Jeff Tan)

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@ The last published release:
4444

4545
```
4646
<!-- Recommended: Latest version of T3 -->
47-
<script src="https://cdn.rawgit.com/box/t3js/v2.6.0/dist/t3.js"></script>
47+
<script src="https://cdn.rawgit.com/box/t3js/v2.7.0/dist/t3.js"></script>
4848
4949
<!-- Recommended: Latest minified version of T3 -->
50-
<script src="https://cdn.rawgit.com/box/t3js/v2.6.0/dist/t3.min.js"></script>
50+
<script src="https://cdn.rawgit.com/box/t3js/v2.7.0/dist/t3.min.js"></script>
5151
5252
<!-- jQuery version (IE8 + 1.8.0+ jQuery) -->
53-
<script src="https://cdn.rawgit.com/box/t3js/v2.6.0/dist/t3-jquery.js"></script>
53+
<script src="https://cdn.rawgit.com/box/t3js/v2.7.0/dist/t3-jquery.js"></script>
5454
5555
<!-- jQuery minified version (IE8 + 1.8.0+ jQuery) -->
56-
<script src="https://cdn.rawgit.com/box/t3js/v2.6.0/dist/t3-jquery.min.js"></script>
56+
<script src="https://cdn.rawgit.com/box/t3js/v2.7.0/dist/t3-jquery.min.js"></script>
5757
```
5858

5959
You may also use `bower` to install t3js:

dist/t3-jquery-2.6.0.min.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

dist/t3-jquery-2.6.0.js renamed to dist/t3-jquery-2.7.0.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! t3-jquery v2.6.0 */
1+
/*! t3-jquery v2.7.0 */
22
/*!
33
Copyright 2016 Box, Inc. All rights reserved.
44
@@ -569,6 +569,7 @@ Box.Application = (function() {
569569
behaviors = {}, // Information about each registered behavior by behaviorName
570570
instances = {}, // Module instances keyed by DOM element id
571571
initialized = false, // Flag whether the application has been initialized
572+
customErrorHandler = null,
572573

573574
application = new Box.EventTarget(); // base object for application
574575

@@ -652,7 +653,10 @@ Box.Application = (function() {
652653
* @private
653654
*/
654655
function error(exception) {
655-
656+
if (typeof customErrorHandler === 'function') {
657+
customErrorHandler(exception);
658+
return;
659+
}
656660
if (globalConfig.debug) {
657661
throw exception;
658662
} else {
@@ -1327,6 +1331,16 @@ Box.Application = (function() {
13271331
// Error reporting
13281332
//----------------------------------------------------------------------
13291333

1334+
/**
1335+
* Overrides default error handler
1336+
* @param {Function} exceptionHandler handling function that takes an
1337+
* exception as argument. Must be called before init.
1338+
* @returns {void}
1339+
*/
1340+
setErrorHandler: function(exceptionHandler) {
1341+
customErrorHandler = exceptionHandler;
1342+
},
1343+
13301344
/**
13311345
* Signals that an error has occurred. If in development mode, an error
13321346
* is thrown. If in production mode, an event is fired.

dist/t3-jquery-2.7.0.min.js

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/t3-jquery-testing-2.6.0.js renamed to dist/t3-jquery-testing-2.7.0.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! t3-jquery-testing v2.6.0 */
1+
/*! t3-jquery-testing v2.7.0 */
22
/*!
33
Copyright 2016 Box, Inc. All rights reserved.
44

dist/t3-jquery-testing.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! t3-jquery-testing v2.6.0 */
1+
/*! t3-jquery-testing v2.7.0 */
22
/*!
33
Copyright 2016 Box, Inc. All rights reserved.
44

0 commit comments

Comments
 (0)