Changeset 2688
- Timestamp:
- 5/25/2012 1:34:41 AM (12 months ago)
- File:
-
- 1 edited
-
trunk/website/scripts/blackbox/upload.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/website/scripts/blackbox/upload.php
r2686 r2688 8 8 function GetFunctionNameFromStackTrace($line) 9 9 { 10 $result = GetStackFrameInformation($line); 11 return $result->function; 12 } 13 14 function GetStackFrameInformation($line) 15 { 16 //at Eraser.Program.OnGUIInitInstance(Object sender) in D:\Development\Projects\Eraser 6.2\Eraser\Program.cs:line 191 10 17 $matches = array(); 18 $function = $file = $line = null; 11 19 if (preg_match('/^([^ ]+) (.*) ([^ ]+) (.*):([^ ]+) ([0-9]+)/', $line, $matches)) 12 20 { 21 $function = $matches[2]; 22 $file = $matches[4]; 23 $line = intval($matches[6]); 13 24 } 14 25 else if (preg_match('/^([^ ]+) (.*)/', $line, $matches)) 15 26 { 27 $function = $matches[2]; 16 28 } 17 18 return $matches[2];29 30 return (object)array('function' => $function, 'file' => $file, 'line' => $line); 19 31 } 20 32 … … 103 115 continue; 104 116 105 //at Eraser.Program.OnGUIInitInstance(Object sender) in D:\Development\Projects\Eraser 6.2\Eraser\Program.cs:line 191 106 $matches = array(); 107 $function = $file = $line = null; 108 if (preg_match('/^([^ ]+) (.*) ([^ ]+) (.*):([^ ]+) ([0-9]+)/', $stackFrame, $matches)) 109 { 110 $function = $matches[2]; 111 $file = $matches[4]; 112 $line = intval($matches[6]); 113 } 114 else if (preg_match('/^([^ ]+) (.*)/', $stackFrame, $matches)) 115 { 116 $function = $matches[2]; 117 } 117 $stackFrameInfo = GetStackFrameInformation($stackFrame); 118 118 119 119 $stackFrameInsert->bindParam(1, $exceptionId); 120 120 $stackFrameInsert->bindParam(2, $stackIndex); 121 $stackFrameInsert->bindParam(3, $ function);122 $stackFrameInsert->bindParam(4, $ file);123 $stackFrameInsert->bindParam(5, $ line);121 $stackFrameInsert->bindParam(3, $stackFrameInfo->function); 122 $stackFrameInsert->bindParam(4, $stackFrameInfo->file); 123 $stackFrameInsert->bindParam(5, $stackFrameInfo->line); 124 124 try 125 125 {
Note: See TracChangeset
for help on using the changeset viewer.
