Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0027318
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSminorhave not tried2014-08-12 23:372014-09-22 16:24
ReportermtaalView Statuspublic 
Assigned Toadrianromero 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Merge Request Status
Review Assigned To
OBNetwork customerNo
Support ticket
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0027318: OB.UTIL.getStackLink throws error

DescriptionSee info below, the getStackLink method is like this:
 OB.UTIL.getStackLink = function () {
    try {
      var errorobj = new Error();
      var link = errorobj.stack.split('\n')[4].split('(')[1];
      link = link.substring(0, link.length - 2);
      return link;
    } catch (e) {
      return '';
    }
  };
Steps To ReproduceWith this errorobj.stack content the link var is undefined:

"Error
    at Object.OB.UTIL.getStackLink (http://188.226.181.203/openbravo/web/js/gen/a41ff86411367a017a4fc7fe32c93d06.js:6323:22 [^])
    at Object.OB.UTIL.saveLogClient (http://188.226.181.203/openbravo/web/js/gen/a41ff86411367a017a4fc7fe32c93d06.js:6236:44 [^])
    at Object.OB.error (http://188.226.181.203/openbravo/web/js/gen/a41ff86411367a017a4fc7fe32c93d06.js:6168:17 [^])
    at http://188.226.181.203/openbravo/web/js/gen/a41ff86411367a017a4fc7fe32c93d06.js:1105:12 [^]
    at serviceError (http://188.226.181.203/openbravo/web/js/gen/a41ff86411367a017a4fc7fe32c93d06.js:850:7 [^])
    at Object.enyo.Ajax.fail (http://188.226.181.203/openbravo/web/js/gen/a41ff86411367a017a4fc7fe32c93d06.js:914:9 [^])
    at Object.enyo.kind.receive (http://188.226.181.203/openbravo/web/org.openbravo.mobile.core/enyo/source/ajax/Ajax.js:87:10 [^])
    at XMLHttpRequest.inXhr.onreadystatechange (http://188.226.181.203/openbravo/web/org.openbravo.mobile.core/enyo/source/ajax/xhr.js:71:16 [^])"
Proposed SolutionMake the method simpler by removing the split('(') and the substring.

 OB.UTIL.getStackLink = function () {
    try {
      var errorobj = new Error();
      return errorobj.stack.split('\n')[4];
    } catch (e) {
      return '';
    }
  };
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2014-08-12 23:37 mtaal New Issue
2014-08-12 23:37 mtaal Assigned To => adrianromero
2014-08-12 23:37 mtaal OBNetwork customer => No
2014-08-12 23:37 mtaal Triggers an Emergency Pack => No
2014-09-22 16:24 mtaal Target Version RR14Q4 =>


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker