Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
annotate
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
open-source
annotate
Commits
a19d2cdd
Commit
a19d2cdd
authored
Aug 22, 2012
by
Jon Frisby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Catch possible exceptions when annotating a file.
parent
b1882bc7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
annotate_models.rb
lib/annotate/annotate_models.rb
+5
-0
No files found.
lib/annotate/annotate_models.rb
View file @
a19d2cdd
...
...
@@ -260,6 +260,7 @@ module AnnotateModels
# :exclude_factories<Symbol>:: whether to skip modification of factory files
#
def
annotate
(
klass
,
file
,
header
,
options
=
{})
begin
info
=
get_schema_info
(
klass
,
header
,
options
)
did_annotate
=
false
model_name
=
klass
.
name
.
underscore
...
...
@@ -293,6 +294,10 @@ module AnnotateModels
end
return
did_annotate
rescue
Exception
=>
e
puts
"Unable to annotate
#{
file
}
:
#{
e
.
message
}
"
puts
"
\t
"
+
e
.
backtrace
.
join
(
"
\n\t
"
)
if
options
[
:trace
]
end
end
# position = :position_in_fixture or :position_in_class
...
...
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