 					numScale * $scope.pdfPageSize[1]
 				]
 				# console.log 'in setScale result', $scope.scale.scale, $scope.defaultPageSize
+			.catch (error) ->
+				$scope.$emit 'pdf:error', error
+				return $q.reject(error)
 
 		@redraw = (position) ->
 			# console.log 'in redraw'

					# console.log 'loading pdf', newVal, oldVal
					return unless newVal?
					scope.loadCount = 0; # new pdf, so reset load count
					ctrl.load()
					# trigger a redraw
					scope.scale = angular.copy (scope.scale)

									spinner.remove(element)
								ctrl.redraw(origposition)
								$timeout renderVisiblePages
								scope.loadSuccess = true
						.catch (error) ->
							scope.$emit 'pdf:error', error
							return $q.reject(error)

				elementTimer = null
				spinnerTimer = null
