Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3-cmds
Commits
061fe813
Commit
061fe813
authored
Oct 11, 2017
by
keks
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add panic() to chanRe.SetError if Emit fails
parent
3486c987
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
chan.go
chan.go
+4
-1
No files found.
chan.go
View file @
061fe813
...
@@ -113,7 +113,10 @@ type chanResponseEmitter struct {
...
@@ -113,7 +113,10 @@ type chanResponseEmitter struct {
}
}
func
(
re
*
chanResponseEmitter
)
SetError
(
v
interface
{},
errType
cmdkit
.
ErrorType
)
{
func
(
re
*
chanResponseEmitter
)
SetError
(
v
interface
{},
errType
cmdkit
.
ErrorType
)
{
re
.
Emit
(
&
cmdkit
.
Error
{
Message
:
fmt
.
Sprint
(
v
),
Code
:
errType
})
err
:=
re
.
Emit
(
&
cmdkit
.
Error
{
Message
:
fmt
.
Sprint
(
v
),
Code
:
errType
})
if
err
!=
nil
{
panic
(
err
)
}
}
}
func
(
re
*
chanResponseEmitter
)
SetLength
(
l
uint64
)
{
func
(
re
*
chanResponseEmitter
)
SetLength
(
l
uint64
)
{
...
...
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