Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
d4c68522
Commit
d4c68522
authored
Nov 05, 2013
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improved error handling of AssetConverter
issue #1140
parent
58589e03
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
+9
-6
exception.php
framework/yii/views/errorHandler/exception.php
+1
-1
previousException.php
framework/yii/views/errorHandler/previousException.php
+1
-1
AssetConverter.php
framework/yii/web/AssetConverter.php
+7
-4
No files found.
framework/yii/views/errorHandler/exception.php
View file @
d4c68522
...
...
@@ -359,7 +359,7 @@ pre .diff .change{
}
?>
</h1>
<?php
endif
;
?>
<h2>
<?=
$handler
->
htmlEncode
(
$exception
->
getMessage
(
))
?>
</h2>
<h2>
<?=
nl2br
(
$handler
->
htmlEncode
(
$exception
->
getMessage
()
))
?>
</h2>
<?=
$handler
->
renderPreviousExceptions
(
$exception
)
?>
</div>
...
...
framework/yii/views/errorHandler/previousException.php
View file @
d4c68522
...
...
@@ -15,7 +15,7 @@
<span>
<?=
$handler
->
htmlEncode
(
get_class
(
$exception
))
?>
</span>
<?php
endif
;
?>
</h2>
<h3>
<?=
$handler
->
htmlEncode
(
$exception
->
getMessage
(
))
?>
</h3>
<h3>
<?=
nl2br
(
$handler
->
htmlEncode
(
$exception
->
getMessage
()
))
?>
</h3>
<p>
in
<span
class=
"file"
>
<?=
$exception
->
getFile
()
?>
</span>
at line
<span
class=
"line"
>
<?=
$exception
->
getLine
()
?>
</span></p>
<?=
$handler
->
renderPreviousExceptions
(
$exception
)
?>
</div>
framework/yii/web/AssetConverter.php
View file @
d4c68522
...
...
@@ -9,6 +9,7 @@ namespace yii\web;
use
Yii
;
use
yii\base\Component
;
use
yii\base\Exception
;
/**
* AssetConverter supports conversion of several popular script formats into JS or CSS scripts.
...
...
@@ -24,7 +25,7 @@ class AssetConverter extends Component implements AssetConverterInterface
* target script types (either "css" or "js") and the commands used for the conversion.
*/
public
$commands
=
[
'less'
=>
[
'css'
,
'lessc {from} {to}'
],
'less'
=>
[
'css'
,
'lessc {from} {to}
--no-color
'
],
'scss'
=>
[
'css'
,
'sass {from} {to}'
],
'sass'
=>
[
'css'
,
'sass {from} {to}'
],
'styl'
=>
[
'js'
,
'stylus < {from} > {to}'
],
...
...
@@ -82,10 +83,12 @@ class AssetConverter extends Component implements AssetConverterInterface
}
$status
=
proc_close
(
$proc
);
if
(
$status
!==
0
)
{
Yii
::
error
(
"AssetConverter command '
$command
' failed with exit code
$status
:
\n
STDOUT:
\n
$stdout
\n
STDERR:
\n
$stderr
\n
"
);
}
else
{
if
(
$status
===
0
)
{
Yii
::
trace
(
"Converted
$asset
into
$result
:
\n
STDOUT:
\n
$stdout
\n
STDERR:
\n
$stderr
"
,
__METHOD__
);
}
elseif
(
YII_DEBUG
)
{
throw
new
Exception
(
"AssetConverter command '
$command
' failed with exit code
$status
:
\n
STDOUT:
\n
$stdout
\n
STDERR:
\n
$stderr
"
);
}
else
{
Yii
::
error
(
"AssetConverter command '
$command
' failed with exit code
$status
:
\n
STDOUT:
\n
$stdout
\n
STDERR:
\n
$stderr
"
);
}
return
$status
===
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment