Mentions légales du service

Skip to content
Snippets Groups Projects
Commit c6ab0717 authored by Lucas Nussbaum's avatar Lucas Nussbaum
Browse files

Return 'MISSING' when the microarchitecture field is empty, and improve error message.

parent d2026003
Branches
No related tags found
No related merge requests found
...@@ -191,6 +191,7 @@ class G5KHardwareGenerator < WikiGenerator ...@@ -191,6 +191,7 @@ class G5KHardwareGenerator < WikiGenerator
# For a correct sort of the column, all dates must be in the same # For a correct sort of the column, all dates must be in the same
# format (same number of digits) # format (same number of digits)
def get_date(microarchitecture) def get_date(microarchitecture)
return 'MISSING' if microarchitecture.nil?
release_dates = { release_dates = {
'K8' => '2003', 'K8' => '2003',
'K10' => '2007', 'K10' => '2007',
...@@ -205,7 +206,7 @@ class G5KHardwareGenerator < WikiGenerator ...@@ -205,7 +206,7 @@ class G5KHardwareGenerator < WikiGenerator
'Broadwell' => '2015', 'Broadwell' => '2015',
} }
date = release_dates[microarchitecture.to_s] date = release_dates[microarchitecture.to_s]
raise 'ERROR: microarchitecture not found' if date.nil? raise "ERROR: microarchitecture not found: '#{microarchitecture.to_s}'. Add in hardware.rb" if date.nil?
date date
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment