Advertisement
enevlogiev

asdasdasd

May 2nd, 2015
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.46 KB | None | 0 0
  1. <?php
  2. $_GET['errorLog'] = 'Strange Exception in thread "main" here in at Java_Basics.calc(Java_Basics.java:22) what does it mean? :
  3.                        Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
  4.                            at Java_Basics.calc(Java_Basics.java:22)
  5.                            at Java_Basics.main(Java_Basics.java:13)
  6.  
  7.                            Exception in thread "main" java.lang.oracle.sun.NullPointerException: 4
  8.                            at Java_Basics.getResources(Java_Basics.java:55)
  9.                            at Java_Basics.calc(Java_Basics.java:22)
  10.                            at Java_Basics.main(Java_Basics.java:13)
  11.                        sudo chmod 777 -R /path/to/Dir/Java_Basics.java
  12.                        ';
  13. ?>
  14.  
  15.  
  16.  
  17. <?php
  18.  
  19. $patt = "/\\.([\\w]+Exception):[\\s\\S]*?(at\\s[\\s\\S]*?\\d)\\)/";
  20. $infoPatt = "/\\.([\\w]+)\\(([^():]+):(\\d+)\\)/";
  21.  
  22. $errorLog = $_GET['errorLog'];
  23.  
  24. preg_match_all($patt, $errorLog, $matches);
  25.  
  26. $exceptions = array();
  27.  
  28. foreach ($matches[1] as $match) {
  29.     $exceptions[] = $match;
  30. }
  31.  
  32. //$test = 'at Java_Basics.getResources(Java_Basics.java:55)';
  33. //preg_match_all($infoPatt, $test, $tokens);
  34. //
  35. //var_dump($tokens);
  36.  
  37. $testArr = array();
  38.  
  39. foreach ($matches[2] as $match) {
  40.     $testArr[] = $match;
  41. }
  42.  
  43. //var_dump($testArr);
  44.  
  45.  
  46. foreach ($testArr as $test) {
  47.     var_dump($test);
  48.     preg_match_all($infoPatt, $test, $result);
  49.     var_dump($result);
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement