             
             pendingMessages = pendingMessages.filter { $0 != message }
             
-            hideCurrentMessage(true) {
+            hideCurrentMessage(true, alreadyRemoved: true) {
                 if let next = pendingMessages.last {
                     showMessage(next)
                 }
             }
         }
+    }
+    
+    public static func showErrorMessage(messageType: MessageType, code: Int? = nil) {
+        
+        var text = messageType.rawValue
+        if let code = code where code != 0 {
+            text = String(text.characters.dropLast()) + ": \(code)"
+        }
+        let message = Message(text: text, isError: true)
+        showMessage(message)
     }
     
     public static func cancelMessage(toCancel: Message, animated: Bool = true) {

        let views = ["underStatusBar":underStatusBar]
        addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:|[underStatusBar]|", options: NSLayoutFormatOptions(rawValue: 0), metrics: nil, views: views))
        addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("V:|-(-20)-[underStatusBar(20)]", options: NSLayoutFormatOptions(rawValue: 0), metrics: nil, views: views))
    }
}

        super.init(coder: aDecoder)
    }
    
    private static func hideCurrentMessage(animated: Bool, alreadyRemoved: Bool = false, completion: (()->())? = nil) {
        
        if !alreadyRemoved && pendingMessages.count > 0 {
            pendingMessages.removeLast()
        }
        
