Ver Fonte

Print error and return if clipboard.ReadAll() returns an error

ayn2op há 3 anos atrás
pai
commit
ea5c28ed0e
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      message_input.go

+ 2 - 1
message_input.go

@@ -109,7 +109,8 @@ func (mi *MessageInput) sendAction() {
 func (mi *MessageInput) pasteAction() {
 	text, err := clipboard.ReadAll()
 	if err != nil {
-		log.Fatal(err)
+		log.Println(err)
+		return
 	}
 
 	// Append the text to the message input.