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
813c4f4a
Commit
813c4f4a
authored
May 26, 2013
by
resurtm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Previous exceptions refinements.
parent
b525d9c7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
31 deletions
+48
-31
main.php
framework/yii/views/errorHandler/main.php
+31
-18
previousException.php
framework/yii/views/errorHandler/previousException.php
+17
-13
No files found.
framework/yii/views/errorHandler/main.php
View file @
813c4f4a
...
...
@@ -55,7 +55,7 @@ a{
a
:hover
{
text-decoration
:
underline
;
}
h1
,
h2
,
p
,
img
,
ul
li
{
h1
,
h2
,
h3
,
p
,
img
,
ul
li
{
font-family
:
Arial
,
sans-serif
;
color
:
#505050
;
}
...
...
@@ -92,33 +92,46 @@ html,body{
font-size
:
20px
;
text-shadow
:
0
1px
0
#cacaca
;
}
/* previous exceptions */
.header
div
.previous
{
margin
:
20px
20px
0
0
;
.header
.previous
{
margin
:
20px
0
;
padding-left
:
30px
;
}
.header
div
.previous
div
{
margin
:
15px
20px
0
25px
;
.header
.previous
div
{
margin
:
20px
0
;
}
.header
div
.previous
h1
{
font-size
:
20px
;
margin-bottom
:
10px
;
}
h1
span
.arrow
{
display
:
inline-block
;
.header
.previous
.arrow
{
-moz-transform
:
scale
(
-1
,
1
);
-webkit-transform
:
scale
(
-1
,
1
);
-o-transform
:
scale
(
-1
,
1
);
transform
:
scale
(
-1
,
1
);
filter
:
progid
:
DXImageTransform
.
Microsoft
.
BasicImage
(
mirror
=
1
);
width
:
30px
;
text-align
:
center
;
font-size
:
26px
;
position
:
absolute
;
margin-top
:
-9px
;
margin-left
:
-22px
;
color
:
#e51717
;
text-shadow
:
0
1px
0
#cacaca
;
}
.header
div
.previous
h2
{
font-size
:
15px
;
margin-left
:
30px
;
.header
.previous
h2
{
font-size
:
20px
;
color
:
#e51717
;
text-shadow
:
0
1px
0
#cacaca
;
margin-bottom
:
10px
;
}
.header
div
.previous
p
{
margin
:
10px
0
0
30px
;
.header
.previous
h2
a
{
color
:
#e57373
;
}
.header
.previous
h2
a
:hover
{
color
:
#e51717
;
}
.header
.previous
h3
{
font-size
:
14px
;
margin
:
10px
0
;
}
.header
.previous
p
{
font-size
:
14px
;
color
:
#aaa
;
}
...
...
framework/yii/views/errorHandler/previousException.php
View file @
813c4f4a
<div
class=
"previous"
>
<h1><span
class=
"arrow"
>
↵
</span><span>
Caused by:
</span>
<?php
/**
<?php
/**
* @var \yii\base\View $this
* @var \yii\base\Exception $exception
* @var string $previousHtml
* @var \yii\base\ErrorHandler $context
*/
$context
=
$this
->
context
;
if
(
$exception
instanceof
\yii\base\Exception
)
{
echo
'<span>'
.
$context
->
htmlEncode
(
$exception
->
getName
())
.
'</span>'
;
echo
' – '
.
$context
->
addTypeLinks
(
get_class
(
$exception
));
}
else
{
echo
'<span>'
.
$context
->
htmlEncode
(
get_class
(
$exception
))
.
'</span>'
;
}
?>
</h1>
<h2>
<?php
echo
$context
->
htmlEncode
(
$exception
->
getMessage
());
?>
</h2>
<p>
In
<span
class=
"file"
>
<?php
echo
$exception
->
getFile
();
?>
</span>
at line
<span
class=
"line"
>
<?php
echo
$exception
->
getLine
();
?>
</span></p>
$context
=
$this
->
context
;
?>
<div
class=
"previous"
>
<span
class=
"arrow"
>
↵
</span>
<h2>
<span>
Caused by:
</span>
<?php
if
(
$exception
instanceof
\yii\base\Exception
)
:
?>
<span>
<?php
echo
$context
->
htmlEncode
(
$exception
->
getName
());
?>
</span>
–
<?php
echo
$context
->
addTypeLinks
(
get_class
(
$exception
));
?>
<?php
else
:
?>
<span>
<?php
echo
$context
->
htmlEncode
(
get_class
(
$exception
));
?>
</span>
<?php
endif
;
?>
</h2>
<h3>
<?php
echo
$context
->
htmlEncode
(
$exception
->
getMessage
());
?>
</h3>
<p>
in
<span
class=
"file"
>
<?php
echo
$exception
->
getFile
();
?>
</span>
at line
<span
class=
"line"
>
<?php
echo
$exception
->
getLine
();
?>
</span></p>
<?php
echo
$previousHtml
;
?>
</div>
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