Legoktm has uploaded a new change for review.
https://gerrit.wikimedia.org/r/173342
Change subject: AutoloadGenerator: Don't throw MWExceptions
......................................................................
AutoloadGenerator: Don't throw MWExceptions
The class won't have been autoloaded, so it can't be used.
Change-Id: I54a9be600839c7bffe7debb8ee35ac46694390b4
---
M includes/utils/AutoloadGenerator.php
1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/42/173342/1
diff --git a/includes/utils/AutoloadGenerator.php
b/includes/utils/AutoloadGenerator.php
index bcd3393..ee2c77a 100644
--- a/includes/utils/AutoloadGenerator.php
+++ b/includes/utils/AutoloadGenerator.php
@@ -67,11 +67,11 @@
public function forceClassPath( $fqcn, $inputPath ) {
$path = realpath( $inputPath );
if ( !$path ) {
- throw new \MWException( "Invalid path: $inputPath" );
+ throw new \Exception( "Invalid path: $inputPath" );
}
$len = strlen( $this->basepath );
if ( substr( $path, 0, $len ) !== $this->basepath ) {
- throw new \MWException( "Path is not within basepath:
$inputPath" );
+ throw new \Exception( "Path is not within basepath:
$inputPath" );
}
$shortpath = substr( $path, $len );
$this->overrides[$fqcn] = $shortpath;
@@ -83,11 +83,11 @@
public function readFile( $inputPath ) {
$path = realpath( $inputPath );
if ( !$path ) {
- throw new \MWException( "Invalid path: $inputPath" );
+ throw new \Exception( "Invalid path: $inputPath" );
}
$len = strlen( $this->basepath );
if ( substr( $path, 0, $len ) !== $this->basepath ) {
- throw new \MWException( "Path is not within basepath:
$inputPath" );
+ throw new \Exception( "Path is not within basepath:
$inputPath" );
}
$result = $this->collector->getClasses(
file_get_contents( $path )
--
To view, visit https://gerrit.wikimedia.org/r/173342
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I54a9be600839c7bffe7debb8ee35ac46694390b4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits